Skip to content

Add error types for state/planfile version incompatibility #58

@kmoe

Description

@kmoe

There is a class of CLI errors of the form:

            Error: Invalid plan file
            
            Failed to read plan from plan file: plan file was created by Terraform
            0.12.29, but this is 0.13.0; plan files cannot be transferred between
            different Terraform versions.

Handle all these cases with well-known error types:

The only "format_version" presently known by terraform-json and this library is 0.1. Add at least an e2e test that will flag if another version is encountered. There's no need to error at runtime unless and until the Terraform CLI does so.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions