graph LR
subgraph tf-example-org
A[aft-bootstrap]
end
subgraph github-aft
direction LR
K[aft-framework]
L[aft-account-customizations]
M[aft-account-provisioning-customizations]
N[aft-global-customizations]
O[aft-account-requests]
end
subgraph tf-example-org-aft
B[aft-framework]
G[ct-aft-account-requests]
H["ct-aft-account-provisioning-customizations *unused*"]
subgraph global-customizations [global-customizations *unused*]
I[123456789012-global-customizations]
end
subgraph account-customizations
J[123456789012-account-customizations]
end
end
subgraph aws-org
Q[sandbox-123456789012]
end
subgraph tf-example-org-workloads
C[sandbox-123456789012]
end
subgraph github-workloads
P[sandbox-123456789012]
end
A --creates org, teams, aft-framework workspace--> tf-example-org-aft
A --creates org, teams--> tf-example-org-workloads
A --creates repos\nfrom templates--> github-aft
B --> G
B --> H
G --creates\nworkspace--> I
G --creates\nworkspace--> J
J --creates\nworkspace--> C
github-aft --repos link\nto workspaces--> tf-example-org-aft
P --repo links\nto workspace--> C
J --creates\nrepoo--> P
G --creates\naccount--> Q
J --creates OIDC\npolicies and role--> Q
C --deploys to AWS account\nwith OIDC--> Q
- Choose an email address for AFT
- Create AFT HashiCorp user with that email
- Verify the email address
- Create AFT GitHub user with that email
- Verify the email address
- Create a repo called aft-bootstrap, using this repository as the template
- Log in to Terraform Cloud with an owner account
- If you haven't already, link Terraform to GitHub via personal oauth
- Create a project called "AFT Bootstrap"
- Create a workspace called aft-bootstrap
- Link the aft-bootstrap workspace to the new repo
- Populate variables
- aft_email
- The email from step 2
- github_token
- This token can be attached to either the AFT GitHub user, or another account within the same organization
- The user that the token is attached to must have the ability to create repositories
- The token must have permission to create repositories
- Set token expiration to 1 hour
- tfe_token
- The user that this token attached to must be a member of the Terraform Organization's "owner" team
- Set token expiration to 1 hour
- aft_email
- Plan and Apply
- Accept the invite to the Terraform organization in the AFT Hashicorp account (via email)
- 5 GitHub repositories will be created in the same organization that the aft-bootstrap repository resides. These repositories will use robbycuenot/template-* repositories as a baseline, unless otherwise specified.
- aft-account-customizations
- aft-account-provisioning-customizations
- aft-account-requests
- aft-framework
- aft-global-requests
- The AFT Terraform user will be added to the organization, based off of aft_email
- A new Terraform team called "aft-admins" will be created
- The AFT Terraform user will be added to this team
- A team token will be created on this team
- A workspace called "aft-framework" will be created in the default project
- This workspace will be linked to the newly created "aft-framework" repository
- The team token will be stored as a secret on this workspace
- The repository names will be stored on this workspace as variables
- Empty variables for AWS Account IDs and AWS Credentials will be created
- A new project will be created called "Workspaces"
- The aft-admins team will be granted admin access to the default and Workspaces projects