You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+43-6Lines changed: 43 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -31,17 +31,54 @@ And workflow for this project looks like
31
31
32
32
33
33
34
-
## Create accounts
34
+
## Create and configure accounts
35
35
36
-
Create a free Okta Developer Edition account. In the Okta dashboard, create an API Services application using a public/private key pair generated by Okta. Enable `okta.groups.manage` scope and add `Organization Administrator` as an admin role.
36
+
Create a free Okta Developer Edition account. In the Okta Admin Console, create an API Services application using a public/private key pair generated by Okta. Enable `okta.groups.manage` scope and add `Organization Administrator` as an admin role.
37
37
38
-
In the AWS account, set up an S3 bucket, a DynamoDB Table, and use Secrets Manager for the private key.
38
+
In the AWS account, set up an S3 bucket and a DynamoDB Table for the Terraform backend, and use Secrets Manager for the API Services application private key. Setup the OIDC Identity Provider for GitHub, and the Role and Policy within AWS IAM to allow authentication and authorization to the configured AWS Resources.
39
39
40
-
In the GitHub account, create a new repository using this project as the template.
40
+
In the GitHub account, create or use an existing GitHub Organization, and create a new repository using this project as the template. Set the `AWS_ROLE_ARN` and `AWS_REGION` repository variables with the respective values from AWS.
41
41
42
-
## Configure variables
42
+
## Build the CI/CD pipeline using Terraform and Okta
43
+
44
+
### Setup branches
45
+
46
+
Create and checkout the develop branch.
47
+
48
+
```
49
+
git checkout main
50
+
git pull origin main
51
+
git checkout -b develop
52
+
```
53
+
54
+
### Configure variables
55
+
56
+
Update the `backend-*.conf` and `tfvars` files and replace variables with values from your Okta account, AWS account, and GitHub.
57
+
58
+
### Configure resources and variables
59
+
60
+
Uncomment the pre-defined resources and variables within the `terraform/modules/directory/variables.tf`, `terraform/modules/directory/okta_groups.tf`, `terraform/variables.tf`, `terraform/main.tf`, and `tfvars` files to prepare for creating a group within the Okta environments.
61
+
62
+
### Push the changes to develop
63
+
64
+
Stage and push the changes to the develop branch to trigger the GitHub Actions workflow `Dev Build`, which uses Terraform to build against the Okta development environment.
65
+
66
+
```
67
+
git add .
68
+
git commit -m "Initial commit"
69
+
git push origin develop
70
+
```
71
+
72
+
Observe the workflow within GitHub Actions.
73
+
74
+
### Pull request to main
75
+
76
+
Create a pull request from develop to main within the repository to trigger the GitHub Actions workflow `Prod Plan`, which uses Terraform to show the potential changes without applying them against the Okta production environment. Observe the workflow within GitHub Actions.
77
+
78
+
### Merge to main
79
+
80
+
Merge the pull request to main within the repository to trigger the GitHub Actions workflow `Prod Build`, which uses Terraform to build against the Okta production environment. Observe the workflow within GitHub Actions.
43
81
44
-
Update the `backend-*.conf` and `tfvars` files and replace variables with values from your Okta domain, AWS account, and GitHub.
0 commit comments