Repository navigation
fix(terraform): count imports in plan summary, list destroys above the fold - #397
Merged
Merged
Conversation
…bove the fold The summary regex never matched 'Plan: N to import, ...', so any plan with imports fell back to 'Changes planned' and hid its destroy count. Also lists destroyed/replaced addresses outside the collapsed plan and drops refresh noise from the commented plan so less of it gets truncated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
joscdk
approved these changes
Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
On monta-app/terraform-core#286 the plan comment said only Changes planned. It hid that
accounts/internal/iamdestroysmodule.users.aws_iam_policy.clickpipes.The cause wasn't the plan length. The summary regex only matched
Plan: N to add, N to change, N to destroy., and Terraform printsPlan: N to import, ...when the plan has imports. So every plan with an import lost its counts.What
N to import,part, and the summary shows 🔵 import / 🟢 add / 🟡 change / 🔴 destroy. Counts are read from the fullplan.txt, so they survive truncation.[!CAUTION]block outside the collapsed plan lists every address thatwill be destroyedormust be replaced.Refreshing state... / Reading... / Read complete / Preparing import...lines, so the 60k limit is spent on the diff. On feat: add FARO_API_KEY build secret for source-map upload #286 that cuts ~146k chars down to ~100k.Tested the regexes against the #286 run log: they give
2/0/1/1and17/0/10/0, and find the one destroy.After merge, bump the pinned SHA in terraform-core
.github/workflows/terraform.yml(and any other callers).🤖 Generated with Claude Code