Interview Prep/Terraform/Partial Applies, Version Mismatches and CI Failures

Renovate opened a PR bumping the AWS provider; CI plan shows changes in 30 stacks. How do you triage?

AdvancedTroubleshootingPartial Applies, Version Mismatches and CI Failures
Answer

Likely causes → New provider defaults, schema normalization or deprecations; most diffs are harmless, a few might be real behaviour changes.

Diagnose →

for d in stacks/*/; do
  (cd "$d" && terraform plan -input=false -out=tfplan >/dev/null && \
   terraform show -json tfplan | jq -r --arg d "$d" '.resource_changes[] | select(.change.actions != ["no-op"]) | "\($d) \(.address) \(.change.actions|join(","))"')
done | sort | uniq -c

Group by resource type and action; any delete/create is a red flag.

Fix → Approve state-only updates; for real changes, set arguments explicitly or pin the old version for affected stacks and report upstream.

Prevent → Small, frequent provider bumps and a plan-summary bot that flags destroys.

All Terraform questions

More on Partial Applies, Version Mismatches and CI Failures