Summary
Configure Terraform remote state storage using an S3 backend with DynamoDB state locking to prevent concurrent apply operations from corrupting infrastructure state.
Background
Terraform state is currently managed locally, making it impossible for multiple team members to safely apply changes or run CI-based plans. Remote state with locking is a prerequisite for team collaboration and CI automation.
Requirements
- S3 bucket: workload-governor-tfstate with versioning enabled and public access blocked
- DynamoDB table: workload-governor-tfstate-lock with LockID primary key
- Backend configuration in terraform/main.tf using S3 backend
- Separate state files per environment (staging, production) using S3 key prefix
- State bucket encrypted with KMS key
- Bootstrap script to create the S3 bucket and DynamoDB table (chicken-and-egg problem)
Acceptance Criteria
References
- terraform/main.tf
- terraform/variables.tf
Summary
Configure Terraform remote state storage using an S3 backend with DynamoDB state locking to prevent concurrent apply operations from corrupting infrastructure state.
Background
Terraform state is currently managed locally, making it impossible for multiple team members to safely apply changes or run CI-based plans. Remote state with locking is a prerequisite for team collaboration and CI automation.
Requirements
Acceptance Criteria
References