Personal AWS infrastructure managed with Terraform. Each top-level directory is a standalone root module with its own state.
- Terraform (1.5+)
- AWS CLI configured with credentials for the target account
- pre-commit (optional, for formatting hooks)
brew install terraform pre-commit
pre-commit install # from repo rootMost stacks use remote state in S3 with DynamoDB locking. Set that up once before applying anything else.
| Step | Directory | State | Purpose |
|---|---|---|---|
| 1 | terraform-bootstrap/ |
Local | Create S3 bucket kwm-terraform-state and DynamoDB table kwm-terraform-state-locks |
| 2 | Any other stack | Remote (S3) | terraform init then terraform apply |
cd terraform-bootstrap
terraform init && terraform applyAfter bootstrap, stacks configure the backend in versions.tf (bucket, key, DynamoDB table, us-east-1).
Use terraform-bootstrap-cf/ to recreate the backend and a recovery controller via CloudFormation. See: