- AWS account with credentials for the target account
- GitHub repository admin access
- Development tools:
make install-toolsinstalls Terraform, AWS CLI, jq, TFLint, and Checkov
# Verify your identity
aws sts get-caller-identityThe account and role resolved must match the target environment. Never commit credentials.
make setupsetup.sh verifies prerequisites, creates the S3 backend bucket with native state locking, creates the account bootstrap stack (shared OIDC provider), generates environment configurations, and writes the environment-to-account mapping in config/environments.json.
Per-root initialization and apply:
terraform -chdir=bootstrap/account init
terraform -chdir=bootstrap/account apply
terraform -chdir=environments/test init
terraform -chdir=environments/test applyNo .tfvars files are committed; set variables via environment (TF_VAR_*) or CLI flags.
Merges to main trigger the test environment deploy workflow:
- TFLint and Checkov scans run fail-closed.
- Terraform plan is posted to pull requests for review.
- Apply runs on push to
mainusing OIDC authentication (no long-lived keys).
make validate-full— format check, per-environment validate, TFLint, and Checkovmake plan ENV=test/make apply ENV=test— targeted runsmake cleanup— interactive cleanup script