
This walks through standing up the full platform in the same order it was
actually built and applied. Follow it in order - later modules assume
earlier ones already exist.
**## Prerequisites
- AWS CLI configured with credentials for the account you're deploying into
- Terraform >= 1.6.0
- kubectl
- git**
Create a dedicated IAM user (not your personal/root credentials) scoped to
exactly what this project needs. See cost-optimization-deployer-policy.json
for the exact policy - it's broad on EC2/EKS/S3 (Terraform needs to create
these freely) but deliberately narrow on IAM itself (no iam:*).
Attach the policy, generate an access key, and export it as a named AWS CLI
profile:
export AWS_PROFILE=cost-optimization-deployer
cd bootstrap
# Edit variables.tf: set state_bucket_name to something globally unique
terraform init
terraform plan # expect exactly 4 resources
terraform apply
This creates the S3 bucket that every other module's state lives in. It uses local state itself - a deliberate, one-time exception.
cd ../environments/dev
# Edit backend.tf: bucket must match state_bucket_name from Step 1 exactly