Skip to content

State files from projects using TF >=1.5 and the check block cannot be loaded as remote state by TF >=1.3, <1.5  #33770

@evan-cleary

Description

@evan-cleary

Terraform Version

Terraform v1.4.6
on darwin_amd64

Terraform Configuration Files

https://github.com/evan-cleary/tf1_5-state-compatibility

Debug Output

https://gist.github.com/evan-cleary/d036479be1c61dc2c09625928c90aec1

Expected Behavior

We expected that state files generated by the 1.X family would be compatible within the 1.X family.

Actual Behavior

Terraform state files generated by version >= 1.5 cannot be loaded as remote state data source by terraform configurations >=1.3, < 1.5 if the source configuration uses check blocks.

Produces error:
Error: unsupported checkable object kind "check"
image

Steps to Reproduce

Provided repository has an example set of terraform configurations that replicate the seen behavior.

If you have tfenv installed on your system you can run ./run_test.sh to see behavior.

If you do not have tfenv installed on your system

  1. Download TF 1.4.6, or any version >=1.3, <1.5, binary and place terraform binary in tf1_X directory
  2. Download TF 1.5.X binary and place terraform binary in tf1_5 directory
  3. Run ./run_test.sh

Additional Context

We have multiple terraform configuration in our organizations with varying versions of terraform 1.X throughout. If any one project upgrades to >= 1.5 and uses the new check blocks, this would break automation for any configuration that utilizes that projects remote state.

Experimentation has determined that tf >=1.5 state files can be loaded by version >=1.0, <1.3

References

No response

Metadata

Metadata

Assignees

Labels

bugconfirmeda Terraform Core team member has reproduced this issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions