Interview Prep/Terraform/Workflow and Providers

The AWS provider has a new minor release you need. How do you upgrade without breaking production?

IntermediateScenarioWorkflow and Providers
Answer

Situation read → A provider upgrade can change defaults and cause diffs even with unchanged code.

What I'd do →

  1. Read the provider CHANGELOG for the version range.
  2. Bump the constraint in a branch and run terraform init -upgrade.
  3. Run terraform plan in dev, then stage, expecting zero or understood diffs.
  4. Merge the updated .terraform.lock.hcl and promote through environments.

Why → The plan is the safety net: an upgrade that shows unexpected replacements is stopped before any apply.

Interview tip → For a major version upgrade, do it alone in its own PR, never mixed with feature work.

All Terraform questions Roadmap: Terraform

More on Workflow and Providers