-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Description
Terraform Version
Terraform v1.4.6
on darwin_amd64Terraform 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"

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
- Download TF 1.4.6, or any version
>=1.3, <1.5, binary and placeterraformbinary in tf1_X directory - Download TF 1.5.X binary and place
terraformbinary in tf1_5 directory - 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