cicd
infrastructure
ai_generated
true
Error: Plan approval required. Terraform detected changes that require approval before applying.
ID: cicd/terraform-plan-diff
85%Fix Rate
88%Confidence
50Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| any | active | — | — | — |
Root Cause
Terraform plan detected infrastructure changes that differ from the current state. In CI, this often blocks auto-apply pipelines. Caused by manual changes to infrastructure (drift), state file desync, or legitimate code changes requiring review.
genericWorkarounds
-
90% success Review the plan output and approve intentional changes
Run terraform plan -out=plan.tfplan to save the plan. Review the output carefully. If changes are intentional, apply with terraform apply plan.tfplan. In CI, post the plan as a PR comment for team review before applying.
-
85% success Import or refresh state to resolve drift from manual changes
If changes are due to manual modifications: terraform import <resource> <id> for new resources. terraform refresh to update state to match actual infrastructure. Use terraform state commands to reconcile.
Dead Ends
Common approaches that don't work:
-
Auto-applying terraform without reviewing the plan in production
75% fail
Unreviewed auto-apply can destroy or modify production resources. Destructive changes (replace, destroy) are especially dangerous without human review.
-
Ignoring plan diffs and merging without resolving drift
70% fail
Infrastructure drift compounds over time. Future plans become increasingly large and confusing, making it harder to determine which changes are intentional.
Error Chain
Leads to:
Preceded by:
Frequently confused with: