Infrastructure Changes¶
Recro AWS infrastructure (SSO and DNS) is managed via Terraform in the recro-aws-iac repository.
Overview¶
| Resource | Config File | What It Manages |
|---|---|---|
| SSO | terraform/sso.tfvars |
Users, groups, permission sets, account assignments |
| DNS | terraform/dns.tfvars |
Route53 hosted zones and static records |
Workflow¶
All changes follow this process:
- Edit the appropriate
.tfvarsfile - Commit and open a PR
- Merge to
main(CI runsterraform plan) - Create a date-based tag to apply
Important: Terraform apply never runs automatically. You must create a tag to trigger the apply workflow.
Add or Modify an SSO User¶
-
Clone the repository:
-
Edit
terraform/sso.tfvars: - Add user to the
userslist -
Assign user to appropriate
group(architect, engineer, or audit) -
Commit and push:
-
Open a PR and merge to
main -
Create a date-based tag to apply:
Add or Modify a DNS Record¶
- Edit
terraform/dns.tfvars: -
Add the record to the appropriate hosted zone
-
Follow the same PR → merge → tag flow
Note: Dynamic DNS records created by cert-manager or external-dns should live under subdomains and are NOT managed in this repository.
CI/CD Pipeline¶
| Trigger | Action | Workflow |
|---|---|---|
Push to main |
terraform init + plan |
validate.yaml |
Push date tag (YYYY-MM-DD) |
terraform apply |
release.yaml |
Tag Format¶
Use date-based tags: YYYY-MM-DD
Multiple changes on the same day can use a suffix: 2025-01-07-2
Local Development¶
If you need to run Terraform locally (requires AWS credentials):
make init # Initialize Terraform
make plan # Preview changes
make apply # Apply changes (requires valid plan file)
make status # Show versions and config
make clean # Remove plan file and .terraform
Guardrails¶
- No manual console changes - All infrastructure changes go through the repo
- Verify identity first - Run
aws sts get-caller-identitybefore Terraform operations - Destroy is restricted - Only GitHub admins can run destroy workflows
What This Repo Does NOT Manage¶
- Domain purchasing (manual)
- IAM Identity Center enablement (manual, one-time setup)
- Dynamic DNS records (managed by cert-manager, external-dns)
- IAM roles/policies (separate from Identity Center)
See Also¶
- AWS SSO Setup - CLI configuration
- SSO Permissions - Available permission sets