-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Description
Terraform Version
Terraform v1.9.2Use Cases
When running terraform plan, resources that require replacement are currently represented as both an addition and a destruction in the final plan summary, for example:
Plan: 4 to add, 21 to change, 4 to destroy.
In real-world usage—especially in CI/CD pipelines, large infrastructures, and production environments—this summary can be confusing because:
- A replacement is conceptually a single operation, not two independent actions
- The final summary does not clearly communicate how many resources are being replaced
- Users must manually scan the plan output (-/+) to understand what is actually happening
- This increases cognitive load during reviews and approvals
This becomes more problematic for:
- Pull request reviews
- Approval workflows based on plan summaries
- New Terraform users
- Large plans with mixed create/update/replace operations
The goal is to improve clarity and usability of the terraform plan summary without changing Terraform behavior.
Attempted Solutions
Currently, replacements can only be identified by manually inspecting the detailed plan output for -/+ markers.
Example:
-/+ resource "null_resource" "webapi_health_check" {
~ triggers = {
~ "always_run" = "2026-01-16T04:59:40Z" -> (known after apply)
}
}
Final summary:
Plan: 4 to add, 21 to change, 4 to destroy.
In this case, there may be no true new resources and no true deletions, only replacements, yet the summary suggests otherwise.
There is no built-in way in Terraform Core to clearly summarize replacements at a high level.
Proposal
Enhance the terraform plan summary to explicitly report resource replacements.
Example (Conceptual):
Plan Summary:
4 to replace
21 to change
0 to add
0 to destroy
Or a concise format:
Plan: 21 to change, 4 to replace.
Notes
This is a UX / presentation-only change
No impact on state, apply logic, or execution order
Terraform already internally identifies replacements (-/+)
Improves readability, review confidence, and onboarding experience
Why This Helps
- Reduces confusion between replacement and destruction
- Improves plan review quality in CI/CD pipelines
- Makes Terraform behavior easier to explain to non-experts
- Enhances overall user experience with minimal behavioral change
I understand this may seem like a small or unusual request, but it could significantly improve day-to-day usability for many Terraform users.
References
No response