Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Summary of plan for human reviewers #8

Open
henrjk opened this issue Jan 3, 2024 · 0 comments
Open

Summary of plan for human reviewers #8

henrjk opened this issue Jan 3, 2024 · 0 comments

Comments

@henrjk
Copy link
Member

henrjk commented Jan 3, 2024

Terraform plan output is typically quite large. In hashicorp/terraform#10507 (comment) there was a decision to not provide direct support for concise formatting but instead give the ability to format the plan as json (and document the format).

Now in the mentioned issue there are regexes mentioned as workaround, for example in comment hashicorp/terraform#10507 (comment): terraform plan -no-color | grep -E '(^.*[#~+-] .*|^[[:punct:]]|Plan)'

The benefit of this regex is that it typically shows the important pieces of the output.

I would suspect that there are many good tools for summarizing and or evaluating terraform plans, but have not found too many. One example is tf-summarize which provide a summary of changes.

As a reviewer you would like to see which resources are being planned for import/deletion/creation and presumably for these the name would be sufficient as the resources themselves or the terraform configuration can be inspected to see all details.
However for updates it would be nice to see the drift.
In the (few) examples I tried the above grep statement appears to work well here.

One possibility would be to support a regex for plan output filtering which might to default the above information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant