What do you look for when reviewing a teammate's Terraform PR?
IntermediateScenarioTesting Upgrades and Large-Scale Operations
Answer
Situation read → A code review for infrastructure.
What I'd do →
- Read the plan first: creates, updates, destroys, replacements; question every
forces replacement. - Security: IAM wildcards, open CIDRs, unencrypted storage, public access.
- Blast radius: shared resources, state boundaries.
- Quality: variable validation, module pinning, naming, tags, no hardcoded IDs.
Why → The plan shows effects; the code shows intent; both matter.
Interview tip → "I review the plan before I review the code."
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