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

How do you handle dev being cheaper than prod without forking code?

IntermediateProductionRepository Structure, Environments and Module Strategy
Answer

Make the differences explicit inputs: instance class, node count, multi-AZ, retention, deletion protection. Dev uses smaller defaults; prod overrides in its tfvars. Keep the topology identical (same modules, same dependencies) so what you test in dev is what you ship. Toggle optional components (NAT per AZ, WAF) by boolean variables.

All Terraform questions Roadmap: Terraform in production

More on Repository Structure, Environments and Module Strategy