Terraform 1.6
This overview applies when the project's target Terraform version is at least 1.6.
Testing
terraform testis generally available. Tests live in.tftest.hclfiles as orderedrunblocks that execute plans and optional applies, then evaluate assertions against plan and state values.- Test runs can pass outputs from earlier runs into later runs. Test cleanup destroys infrastructure in reverse run order.
Import and planning
- An
importblock'sidaccepts an expression when it resolves to a string known at plan time. - HCP Terraform and Terraform Enterprise remote plans can be saved with
-out, inspected withterraform show, and applied from the saved plan file. - Refined unknown values can carry facts such as non-nullness or collection length ranges, allowing more expressions to produce known plan results.
S3 backend migration
- Assume-role settings move into an
assume_roleblock. - Service endpoint overrides move into an
endpointsblock. shared_credentials_filesreplacesshared_credentials_file, anduse_path_stylereplacesforce_path_style.- Standard
AWS_ENDPOINT_URL_*variables replace the older Terraform-specific endpoint environment variables.
Compatibility
- Terraform 1.6 requires macOS 10.15 or later and Windows 10 or Windows Server 2016 or later.