Reconstruct plan from binary or json

Hi team,

Is there a way to reconstruct terraform plan stdout from generated plan or json files.

In our workflow we generate both “bin” and json files as artifacts, suppress stdout as trying to parse strderr.

Need to attach some readable evidences to successfully completed job.


Hi @chell0veck,

If by “binary” you mean the file created by the -out option of terraform plan, then you can reproduce something similar to what terraform plan would show in its UI output by passing that file to terraform show without the -json option:

terraform plan -out=tfplan
terraform show tfplan

The “human-oriented” output is the default mode when -json isn’t specified.

1 Like