Terraform
Upgrading to Terraform v1.7
Tip: Use the version selector to view the upgrade guides for older Terraform versions.
Terraform v1.7 is a minor release in the stable Terraform v1.0 series.
Terraform v1.7 honors the Terraform v1.0 Compatibility Promises, but there are some behavior changes outside of those promises that may affect a small number of users. Specifically, the following updates may require additional upgrade steps:
See the full changelog for more details. If you encounter any problems during upgrading which are not covered this guide, please start a new topic in the Terraform community forum to discuss it.
Validations and Checks
Due to a state interoperability issue (#33770, #34014) in earlier versions of Terraform, state files created by the Terraform v1.7.x series may not be compatible with the following Terraform versions:
- Terraform v1.3.0 through v1.3.9
- Terraform v1.4.0 through v1.4.6
- Terraform v1.5.0 through v1.5.6
If your v1.7.x state file contains check
blocks or input validations, it will not be compatible with the above versions. Attempting to load a state file created by Terraform v1.7.x in one of the above versions will result in an error similar to Error refreshing state: unsupported checkable object "var"
. This will particularly affect configurations using the terraform_remote_state
data source to load state files created by the v1.7.x
series.
To prevent this issue, users should upgrade any usage of the affected versions to the following patch releases in the relevant minor release series before attempting to process state files created by Terraform v1.7.x:
- Terraform v1.3.x series users should upgrade to v1.3.10
- Terraform v1.4.x series users should upgrade to v1.4.7
- Terraform v1.5.x series users should upgrade to v1.5.7
Terraform versions prior to v1.3.0 and equal to or after v1.6.0 are not affected by this issue.
S3 Backend
In Terraform 1.7.0 the S3 backend will begin phasing out the legacy credential chain evaluation order by defaulting use_legacy_workflow
to false
and deprecating the argument.
This will bring the default behavior of the backend into alignment with the AWS SDKs and CLI.
The legacy behavior can be preserved by setting this argument to true
.
terraform {
backend "s3" {
# additional configuration omitted for brevity
use_legacy_workflow = true
}
}
In Terraform 1.8.0 this argument will be removed, and the S3 backend will always use the default AWS SDK for Go credential chain evaluation order.