Major AWS provider upgrade from v4 to v5 (or v5 to v6) across many stacks. How do you plan it?
AdvancedScenarioTesting Upgrades and Large-Scale Operations
Answer
Situation read → Major versions change defaults and remove deprecated arguments.
What I'd do →
- Read the upgrade guide; list breaking changes that touch your resources.
- Upgrade to the latest minor of the old major first to see deprecation warnings.
- Bump a single low-risk stack, fix code, and capture the pattern.
- Roll out stack by stack with plans reviewed for unexpected diffs.
- Pin to the new major in a shared module constraint.
Why → The provider is where most upgrade breakage lives, so move slowly and learn from the pilot.
Interview tip → Cite a concrete change, such as the v4 S3 bucket argument split into separate resources.
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?IntermediateA stack is still on Terraform 0.12 syntax and old providers. What upgrade path do you follow?Advanced