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

terraform show planfile without -json is incomplete in v0.12.0 #21446

Closed
apparentlymart opened this issue May 24, 2019 · 5 comments
Closed

terraform show planfile without -json is incomplete in v0.12.0 #21446

apparentlymart opened this issue May 24, 2019 · 5 comments
Labels
bug cli v0.12 Issues (primarily bugs) reported against v0.12 releases

Comments

@apparentlymart
Copy link
Contributor

The plan rendering from terraform plan was updated to the new structural diff format in v0.12.0, but the corresponding codepath in terraform show (not in JSON mode) was not updated, so it's using a much-reduced version of the old codepath that only shows the top-level actions, and not individual attribute diffs.

To reproduce:

  • Run terraform plan -out=tfplan to produce a saved plan file
  • Run terraform show tfplan

If the plan contained any create or update actions, notice that they only have the headline of the action and not any details about the individual attributes.

@dayglojesus
Copy link

The addition of the -json flag is invaluable, but being able to produce human-readable output from a plan file is critical for the toolchain we use. There appear to be a couple of similar open issues surrounding this regression from 0.11.x. Here is what I have found:

@dcalhoun
Copy link

dcalhoun commented Aug 7, 2019

I agree with @dayglojesus. With my team's process, the inability to see human-readable details of what is changing means we are "flying blind" when reviewing a plan and applying it. Unfortunately 0.12.x is unusable for us without this issue being addressed first.

@apparentlymart are there any plans to prioritize this? If not, is there a specific location in the code you could point to where one might contribute a fix? Thanks.

@hashibot hashibot added the v0.12 Issues (primarily bugs) reported against v0.12 releases label Aug 22, 2019
@mrparkers
Copy link

Just want to chime in here and say that this is the only issue preventing the company I work for from switching to Terraform 0.12. Echoing what @dcalhoun mentioned, I'd love to help contribute a fix if someone could point me in the right direction.

btromanova added a commit to uber/astro that referenced this issue Sep 24, 2019
This fixes issue #38 and adds 0.12.6 to the list of versions we test against.

Context: `terraform show` is broken since 0.12 (see hashicorp/terraform#21446), so I'm using regex on top of `terraform plan` to produce the plan output.

Tests were fixed to support changes in output in 0.12.
@apparentlymart
Copy link
Contributor Author

This was fixed in #23292. The fix should be included in the next minor release.

@ghost
Copy link

ghost commented Mar 29, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug cli v0.12 Issues (primarily bugs) reported against v0.12 releases
Projects
None yet
Development

No branches or pull requests

5 participants