You need to push a change across 100 workspaces. How do you do it safely?
AdvancedScenarioTesting Upgrades and Large-Scale Operations
Answer
Situation read → Fleet-wide rollout, such as a module version bump.
What I'd do →
- Group workspaces into rings: canary (2), non-prod, small prod, rest.
- Automate with a script or the HCP Terraform API (
tfeprovider or CLI) that opens PRs or triggers runs per ring. - Require clean or expected plans before each ring; pause on failures.
- Track progress in a dashboard.
Why → Rings limit blast radius and give early signal.
Interview tip → Resist "big bang" changes for shared infrastructure.
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