How do you provision per-customer or per-tenant environments?
IntermediateProductionRepository Structure, Environments and Module Strategy
Answer
Model each tenant as data and instantiate a tenant module with for_each, or one state per tenant created by a pipeline from a template. Per-tenant states limit blast radius and allow custom upgrades; one state with for_each is simpler but plan time grows and every tenant is touched at once. Choose based on tenant count and isolation needs.
More on Repository Structure, Environments and Module Strategy
Monorepo or multi-repo for Terraform?BeginnerHow do you lay out environments in a repo?BeginnerWhen would you adopt Terragrunt?BeginnerDo you use tfvars files per environment or code branches?IntermediateHow do you promote a module change from dev to qa to prod?AdvancedWhat is an internal module registry strategy?Beginner