Interview Prep/Terraform/Repository Structure, Environments and Module Strategy

Do you use tfvars files per environment or code branches?

IntermediateProductionRepository Structure, Environments and Module Strategy
Answer

tfvars (or Terragrunt inputs) per environment, one branch. Environment-per-branch means promotions are merges that nobody can reason about and fixes need cherry-picking. A single main branch with per-environment directories and version-pinned modules keeps the diff for each promotion visible.

All Terraform questions Roadmap: Terraform in production

More on Repository Structure, Environments and Module Strategy