
lab: centralized terraform module support
Real Production Idea A platform team maintains one Terraform repository. Application teams do not copy Terraform code. Instead: platform team writes reusable modules root module calls the centralized module for each team and region adding a team means adding one config entry Terraform sees new keys and creates only new resources This is how you avoid: code duplication inconsistent environments dangerous changes one team overwriting another team Final Project Structure terraform-centralized-modules-lab/ ├── modules/ │ └── ecr_repositories/ │ ├── main.tf │ ├── variables.tf │ └── outputs.tf │ ├── envs/ │ └── prod/ │ ├── main.tf │ ├── providers.tf │ ├── variables.tf │ ├── terraform.tfvars │ ├── versions.tf │ └── outputs.tf │ └── README.md Architecture We will create: same centralized child module called once for us-east-2 called once for us-west-1 each module call creates repositories for all teams defined for that region Example: team1 in us-east-2 team2 in us-east-2 and us-west-1 team3 l
Continue reading on Dev.to
Opens in a new tab




