Developers leave dev environments running over weekends, burning money.
BeginnerScenarioTesting Upgrades and Large-Scale Operations
Answer
Situation read → Idle cost.
What I'd do →
- Add a scheduled pipeline running
terraform destroyon dev stacks at night (or scale to zero with schedule-based ASG actions). - Tag
ttlon ephemeral environments and sweep. - Make re-creation a single command.
Why → If environments rebuild reliably, destroying them is free.
Interview tip → This only works with fully-codified, tested environments.
More on Testing Upgrades and Large-Scale Operations
What does each of `terraform validate`, `plan` and `terraform test` actually check?BeginnerWrite a native test for a module that creates an encrypted S3 bucket.IntermediateCompare Terratest with `terraform test`.IntermediateReal-cloud integration tests leave orphaned resources when they fail midway. How do you handle that?AdvancedHow do you upgrade from Terraform 1.5 to 1.9 safely?IntermediateMajor AWS provider upgrade from v4 to v5 (or v5 to v6) across many stacks. How do you plan it?Advanced