Terraform Versions Affected:
Any version prior to v0.13.5
Problem: Upgrades or downgrades prior to Terraform version v0.13.5 cause the state to conflict between major versions and throw the below error:
Error refreshing state: state snapshot was created by Terraform v0.13.5,
which is newer than current v0.12.26;
upgrade to Terraform v0.13.5 or greater to work with this state
A state created by Terraform >= v0.13.6 can be read by any other higher terraform release version in order to upgrade the workspace.
Terraform's state schema is stable, so switching between v0.13.6 -v1.0.x up and down can be done without editing the state.
Once Terraform 0.13.7 is upgraded to version 0.14.x which is officially supported as the recommended upgrade path since it is an upgrade from a major version to the next major version, states are compatible from version 0.14.x to 1.1.x.
This means that a configuration can be applied with any minor version of v0.14, then changed and applied with any other versions v0.14.x - v1.1.x, then applied again with any other version v0.14.x - v1.1.x. This is not a compatibility promise, but there are no plans to change the state file format presently. Any change would occur in a major version.
Terraform will now support reading and writing all compatible state files, even from future versions of Terraform. This means that users of Terraform 0.14.0 will be able to share state files with future Terraform versions until a new state file format version is needed. We have no plans to change the state file format at this time.
- Visit the v0.14 Release Notes and v1.1.0 Release Notes here for more information.
- Upgrading to Terraform v0.14 guide
If needed, please raise a support ticket for additional help.