A stack is still on Terraform 0.12 syntax and old providers. What upgrade path do you follow?
AdvancedScenarioTesting Upgrades and Large-Scale Operations
Answer
Situation read → Skipping versions isn't supported.
What I'd do →
- Step through 0.13, 0.14, 0.15 and 1.0 one at a time, using the matching upgrade guide.
- At 0.13 run
terraform 0.13upgradeand addrequired_providerssources. - Run
planafter each step: expect no diffs. - Then proceed to current 1.x.
Why → State format upgrades are one-way and each step has a guided migration.
Interview tip → Do it on a copy of state first.
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