Skip to content

0.12 show no longer works without initialization #21989

@plukevdh

Description

@plukevdh

We used to use terraform show to display historical plans so as to allow devs to track changes over time or look back at what changes were applied given a specific build. plan files used to be more portable, where a dev could simply grab a plan file from archives and run terraform show <file> anywhere and it displayed the diff. Now, it appears that plans can only be shown if the a) the config/providers hasn't changed and b) you run from within the properly initialized project. This makes historical plan data useless for us. Is this something we can expect to be resolved in upcoming releases?

Terraform Version

Terraform v0.12.2

Debug Output

Crash Output

Expected Behavior

Plan details should be output in the same format as the plan output (either in the 0.11 or the newer 0.12 format).

Actual Behavior

show either gives the error below, or simply displays a list of resources/modules with question marks.

Error: Saved plan is stale

The given plan file can no longer be applied because the state was changed by
another operation after the plan was created.

Error: Could not satisfy plugin requirements

Plugin reinitialization required. Please run "terraform init".

Plugins are external binaries that Terraform uses to access and manipulate
resources. The configuration provided requires plugins which can't be located,
don't satisfy the version constraints, or are otherwise incompatible.

Terraform automatically discovers provider requirements from your
configuration, including providers used in child modules. To see the
requirements and constraints from each module, run "terraform providers".

Error: provider.vault: new or changed plugin executable

Error: provider.template: new or changed plugin executable

Error: provider.aws: new or changed plugin executable

Error: provider.consul: new or changed plugin executable

Steps to Reproduce

terraform plan -output test.out
terraform init -upgrade (so long as some module or provider updates)
terraform show test.out

References

Related, but not necessarily connected.

  • 21596
  • 21966

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions