Releases: hashicorp/terraform
v1.9.0-alpha20240516
1.9.0-alpha20240516 (May 16, 2024)
ENHANCEMENTS:
-
terraform console
: Now has basic support for multi-line input in interactive mode. (#34822)If an entered line contains opening parentheses/etc that are not closed, Terraform will await another line of input to complete the expression. This initial implementation is primarily intended to support pasting in multi-line expressions from elsewhere, rather than for manual multi-line editing, so the interactive editing support is currently limited.
-
terraform plan
: Improved presentation of OPA and Sentinel policy evaluations in HCP Terraform remote runs, for logical separation. -
terraform init
now accepts a-json
option. If specified, enables the machine readable JSON output. (#34886) -
terraform test
: Test runs can now pass sensitive values to input variables while preserving their dynamic sensitivity. Previously sensitivity would be preserved only for variables statically declared as being sensitive, usingsensitive = true
. (#35021) -
Performance improvement during graph building for configurations with an extremely large number of
resource
blocks. (#35088)
BUG FIXES:
remote-exec
: Each remote connection will now be closed immediately after use. (#34137)backend/s3
: Fixed the digest value displayed for DynamoDB/S3 state checksum mismatches. (#34387)terraform test
: Fix bug in which non-Hashicorp providers required by testing modules and initialised within the test files were assigned incorrect registry addresses. (#35161)
UPGRADE NOTES:
terraform test
: It is no longer valid to specify version constraints within provider blocks within .tftest.hcl files. Instead, version constraints must be supplied within the main configuration where the provider is in use.
EXPERIMENTS:
Experiments are only enabled in alpha releases of Terraform CLI. The following features are not yet available in stable releases.
variable_validation_crossref
: This language experiment allowsvalidation
blocks inside input variable declarations to refer to other objects inside the module where the variable is declared, including to the values of other input variables in the same module.template_string_func
: This language experiment introduces a new built-in function namedtemplatestring
which is similar totemplatefile
but designed to render templates obtained dynamically, such as from a data resource result.terraform test
accepts a new option-junit-xml=FILENAME
. If specified, and if the test configuration is valid enough to begin executing, then Terraform writes a JUnit XML test result report to the given filename, describing similar information as included in the normal test output. (#34291)- The new command
terraform rpcapi
exposes some Terraform Core functionality through an RPC interface compatible withgo-plugin
. The exact RPC API exposed here is currently subject to change at any time, because it's here primarily as a vehicle to support the Terraform Stacks private preview and so will be broken if necessary to respond to feedback from private preview participants, or possibly for other reasons. Do not use this mechanism yet outside of Terraform Stacks private preview. - The experimental "deferred actions" feature, enabled by passing the
-allow-deferral
option toterraform plan
, permitscount
andfor_each
arguments inmodule
,resource
, anddata
blocks to have unknown values and allows providers to react more flexibly to unknown values. This experiment is under active development, and so it's not yet useful to participate in this experiment.
Previous Releases
For information on prior major and minor releases, see their changelogs:
v1.8.3
v1.9.0-alpha20240501
1.9.0-alpha20240501 (May 1, 2024)
ENHANCEMENTS:
-
terraform console
: Now has basic support for multi-line input in interactive mode. (#34822)If an entered line contains opening paretheses/etc that are not closed, Terraform will await another line of input to complete the expression. This initial implementation is primarily intended to support pasting in multi-line expressions from elsewhere, rather than for manual multi-line editing, so the interactive editing support is currently limited.
-
cli
: Updates the Terraform CLI output to show logical separation between OPA and Sentinel policy evaluations -
terraform init
now accepts a-json
option. If specified, enables the machine readable JSON output. (#34886) -
terraform test:
The test framework will now maintain sensitive metadata between run blocks. (#35021) -
Core: improved performance of
AttachResourceConfigTransformer
(an implementation detail of plans and applies) when the number of resources is extremely large. (#35088)
BUG FIXES:
remote-exec
: Each remote connection will be closed immediately after use (#34137)backend/s3
: Fixed the digest value displayed for DynamoDB/S3 state checksum mismatches (#34387)
EXPERIMENTS:
Experiments are only enabled in alpha releases of Terraform CLI. The following features are not yet available in stable releases.
variable_validation_crossref
: This language experiment allowsvalidation
blocks inside input variable declarations to refer to other objects inside the module where the variable is declared, including to the values of other input variables in the same module.template_string_func
: This language experiment introduces a new built-in function namedtemplatestring
which is similar totemplatefile
but designed to render templates obtained dynamically, such as from a data resource result.terraform test
accepts a new option-junit-xml=FILENAME
. If specified, and if the test configuration is valid enough to begin executing, then Terraform writes a JUnit XML test result report to the given filename, describing similar information as included in the normal test output. (#34291)- The new command
terraform rpcapi
exposes some Terraform Core functionality through an RPC interface compatible withgo-plugin
. The exact RPC API exposed here is currently subject to change at any time, because it's here primarily as a vehicle to support the Terraform Stacks private preview and so will be broken if necessary to respond to feedback from private preview participants, or possibly for other reasons. Do not use this mechanism yet outside of Terraform Stacks private preview. - The experimental "deferred actions" feature, enabled by passing the
-allow-deferral
option toterraform plan
, permitscount
andfor_each
arguments inmodule
,resource
, anddata
blocks to have unknown values and allows providers to react more flexibly to unknown values. This experiment is under active development, and so it's not yet useful to participate in this experiment.
Previous Releases
For information on prior major and minor releases, see their changelogs:
v1.8.2
1.8.2 (April 24, 2024)
BUG FIXES:
terraform apply
: Prevent panic when a provider erroneously provides unknown values. (#35048)terraform plan
: Replace panic with error message when self-referencing resources and data sources from thecount
andfor_each
meta attributes. (#35047)terraform test
: RestoreTF_ENV_*
variables being made available to testing modules. (#35014)terraform test
: Prevent crash when referencing local variables within overridden modules. (#35030)
ENHANCEMENTS:
- Improved performance by removing unneeded additional computation for a disabled experimental feature. (#35066)
OTHER CHANGES:
- Update all references to Terraform Cloud to refer to HCP Terraform, the service's new name. This only affects display text; the
cloud
block and environment variables likeTF_CLOUD_ORGANIZATION
remain unchanged. (#35050)
NOTE:
Starting with this release, we are including a copy of our license file in all packaged versions of our releases, such as the release .zip files. If you are consuming these files directly and would prefer to extract the one terraform file instead of extracting everything, you need to add an extra argument specifying the file to extract, like this:
unzip terraform_1.8.2_linux_amd64.zip terraform
v1.8.1
1.8.1 (April 17, 2024)
BUG FIXES:
- Fix crash in terraform plan when referencing a module output that does not exist within the try(...) function. (#34985)
- Fix crash in terraform apply when referencing a module with no planned changes. (#34985)
moved
block: Fix crash when move targets a module which no longer exists. (#34986)import
block: Fix crash when generating configuration for resources with complex sensitive attributes. (#34996)- Plan renderer: Correctly render strings that begin with JSON compatible text but don't end with it. (#34959)
v1.8.0
1.8.0 (April 10, 2024)
If you are upgrading from Terraform v1.7 or earlier, please refer to
the Terraform v1.8 Upgrade Guide.
NEW FEATURES:
-
Providers can now offer functions which can be used from within the Terraform configuration language.
The syntax for calling a provider-contributed function is
provider::provider_name::function_name()
. (#34394) -
Providers can now transfer the ownership of a remote object between resources of different types, for situations where there are two different resource types that represent the same remote object type.
This extends the
moved
block behavior to support moving between two resources of different types only if the provider for the target resource type declares that it can convert from the source resource type. Refer to provider documentation for details on which pairs of resource types are supported. -
New
issensitive
function returns true if the given value is marked as sensitive.
ENHANCEMENTS:
-
terraform test
: File-level variables can now refer to global variables. (#34699) -
When generating configuration based on
import
blocks, Terraform will detect strings that contain valid JSON syntax and generate them as calls to thejsonencode
function, rather than generating a single string. This is primarily motivated by readability, but might also be useful if you need to replace part of the literal value with an expression as you generalize your module beyond the one example used for importing. -
terraform plan
now uses a different presentation for describing changes to lists where the old and new lists have the same length. It now compares the elements with correlated indices and shows a separate diff for each one, rather than trying to show a diff for the list as a whole. The behavior is unchanged for lists of different lengths. -
terraform providers lock
accepts a new boolean option-enable-plugin-cache
. If specified, and if a global plugin cache is configured, Terraform will use the cache in the provider lock process. (#34632) -
built-in "terraform" provider: new
decode_tfvars
,encode_tfvars
, andencode_expr
functions, for unusual situations where it's helpful to manually generate or read from Terraform's "tfvars" format. (#34718) -
terraform show
's JSON rendering of a plan now includes two explicit flags"applyable"
and"complete"
, which both summarize characteristics of a plan that were previously only inferrable by consumers replicating some of Terraform Core's own logic. (#34642)"applyable"
means that it makes sense for a wrapping automation to offer to apply this plan."complete"
means that applying this plan is expected to achieve convergence between desired and actual state. If this flag is present and set tofalse
then wrapping automations should ideally encourage an operator to run another plan/apply round to continue making progress toward convergence.
BUG FIXES:
- core: Sensitive values will now be tracked more accurately in state and plans, preventing unexpected updates with no apparent changes. (#34567)
- core: Fix incorrect error message when using in invalid
iterator
argument within a dynamic block. (#34751) - core: Fixed edge-case bug that could cause loss of floating point precision when round-tripping due to incorrectly using a MessagePack integer to represent a large non-integral number. (#24576)
- config: Converting from an unknown map value to an object type now correctly handles the situation where the map element type disagrees with an optional attribute of the target type, since when a map value is unknown we don't yet know which keys it has and thus cannot predict what subset of the elements will get converted as attributes in the resulting object. (#34756)
- cloud: Fixed unparsed color codes in policy failure error messages. (#34473)
Previous Releases
For information on prior major and minor releases, see their changelogs:
v1.9.0-alpha20240404
1.9.0-alpha20240404 (April 4, 2024)
ENHANCEMENTS:
-
terraform console
: Now has basic support for multi-line input in interactive mode. (#34822)If an entered line contains opening paretheses/etc that are not closed, Terraform will await another line of input to complete the expression. This initial implementation is primarily intended to support pasting in multi-line expressions from elsewhere, rather than for manual multi-line editing, so the interactive editing support is currently limited.
BUG FIXES:
remote-exec
: Each remote connection will be closed immediately after use (#34137)backend/s3
: Fixed the digest value displayed for DynamoDB/S3 state checksum mismatches (#34387)
EXPERIMENTS:
Experiments are only enabled in alpha releases of Terraform CLI. The following features are not yet available in stable releases.
terraform test
accepts a new option-junit-xml=FILENAME
. If specified, and if the test configuration is valid enough to begin executing, then Terraform writes a JUnit XML test result report to the given filename, describing similar information as included in the normal test output. (#34291)- The new command
terraform rpcapi
exposes some Terraform Core functionality through an RPC interface compatible withgo-plugin
. The exact RPC API exposed here is currently subject to change at any time, because it's here primarily as a vehicle to support the Terraform Stacks private preview and so will be broken if necessary to respond to feedback from private preview participants, or possibly for other reasons. Do not use this mechanism yet outside of Terraform Stacks private preview. - The experimental "deferred actions" feature, enabled by passing the
-allow-deferral
option toterraform plan
, permitscount
andfor_each
arguments inmodule
,resource
, anddata
blocks to have unknown values and allows providers to react more flexibly to unknown values. This experiment is under active development, and so it's not yet useful to participate in this experiment.
Previous Releases
For information on prior major and minor releases, see their changelogs:
v1.8.0-rc2
1.8.0-rc2 (April 4, 2024)
If you are upgrading from Terraform v1.7 or earlier, please refer to
the Terraform v1.8 Upgrade Guide.
NEW FEATURES:
-
Providers can now offer functions which can be used from within the Terraform configuration language.
The syntax for calling a provider-contributed function is
provider::provider_name::function_name()
. (#34394) -
Providers can now transfer the ownership of a remote object between resources of different types, for situations where there are two different resource types that represent the same remote object type.
This extends the
moved
block behavior to support moving between two resources of different types only if the provider for the target resource type declares that it can convert from the source resource type. Refer to provider documentation for details on which pairs of resource types are supported. -
New
issensitive
function returns true if the given value is marked as sensitive.
ENHANCEMENTS:
-
terraform test
: File-level variables can now refer to global variables. (#34699) -
When generating configuration based on
import
blocks, Terraform will detect strings that contain valid JSON syntax and generate them as calls to thejsonencode
function, rather than generating a single string. This is primarily motivated by readability, but might also be useful if you need to replace part of the literal value with an expression as you generalize your module beyond the one example used for importing. -
terraform plan
now uses a different presentation for describing changes to lists where the old and new lists have the same length. It now compares the elements with correlated indices and shows a separate diff for each one, rather than trying to show a diff for the list as a whole. The behavior is unchanged for lists of different lengths. -
terraform providers lock
accepts a new boolean option-enable-plugin-cache
. If specified, and if a global plugin cache is configured, Terraform will use the cache in the provider lock process. (#34632) -
built-in "terraform" provider: new
decode_tfvars
,encode_tfvars
, andencode_expr
functions, for unusual situations where it's helpful to manually generate or read from Terraform's "tfvars" format. (#34718) -
terraform show
's JSON rendering of a plan now includes two explicit flags"applyable"
and"complete"
, which both summarize characteristics of a plan that were previously only inferrable by consumers replicating some of Terraform Core's own logic. (#34642)"applyable"
means that it makes sense for a wrapping automation to offer to apply this plan."complete"
means that applying this plan is expected to achieve convergence between desired and actual state. If this flag is present and set tofalse
then wrapping automations should ideally encourage an operator to run another plan/apply round to continue making progress toward convergence.
BUG FIXES:
- core: Sensitive values will now be tracked more accurately in state and plans, preventing unexpected updates with no apparent changes. (#34567)
- core: Fix incorrect error message when using in invalid
iterator
argument within a dynamic block. (#34751) - core: Fixed edge-case bug that could cause loss of floating point precision when round-tripping due to incorrectly using a MessagePack integer to represent a large non-integral number. (#24576)
- config: Converting from an unknown map value to an object type now correctly handles the situation where the map element type disagrees with an optional attribute of the target type, since when a map value is unknown we don't yet know which keys it has and thus cannot predict what subset of the elements will get converted as attributes in the resulting object. (#34756)
- cloud: Fixed unparsed color codes in policy failure error messages. (#34473)
Previous Releases
For information on prior major and minor releases, see their changelogs:
v1.8.0-rc1
1.8.0-rc1 (March 20 2024)
If you are upgrading from Terraform v1.7 or earlier, please refer to
the Terraform v1.8 Upgrade Guide.
NEW FEATURES:
-
Providers can now offer functions which can be used from within the Terraform configuration language.
The syntax for calling a provider-contributed function is
provider::provider_name::function_name()
. (#34394) -
Providers can now transfer the ownership of a remote object between resources of different types, for situations where there are two different resource types that represent the same remote object type.
This extends the
moved
block behavior to support moving between two resources of different types only if the provider for the target resource type declares that it can convert from the source resource type. Refer to provider documentation for details on which pairs of resource types are supported. -
New
issensitive
function returns true if the given value is marked as sensitive.
ENHANCEMENTS:
-
terraform test
: File-level variables can now refer to global variables. (#34699) -
When generating configuration based on
import
blocks, Terraform will detect strings that contain valid JSON syntax and generate them as calls to thejsonencode
function, rather than generating a single string. This is primarily motivated by readability, but might also be useful if you need to replace part of the literal value with an expression as you generalize your module beyond the one example used for importing. -
terraform plan
now uses a different presentation for describing changes to lists where the old and new lists have the same length. It now compares the elements with correlated indices and shows a separate diff for each one, rather than trying to show a diff for the list as a whole. The behavior is unchanged for lists of different lengths. -
terraform providers lock
accepts a new boolean option-enable-plugin-cache
. If specified, and if a global plugin cache is configured, Terraform will use the cache in the provider lock process. (#34632) -
built-in "terraform" provider: new
decode_tfvars
,encode_tfvars
, andencode_expr
functions, for unusual situations where it's helpful to manually generate or read from Terraform's "tfvars" format. (#34718) -
terraform show
's JSON rendering of a plan now includes two explicit flags"applyable"
and"complete"
, which both summarize characteristics of a plan that were previously only inferrable by consumers replicating some of Terraform Core's own logic. (#34642)"applyable"
means that it makes sense for a wrapping automation to offer to apply this plan."complete"
means that applying this plan is expected to achieve convergence between desired and actual state. If this flag is present and set tofalse
then wrapping automations should ideally encourage an operator to run another plan/apply round to continue making progress toward convergence.
BUG FIXES:
- core: Sensitive values will now be tracked more accurately in state and plans, preventing unexpected updates with no apparent changes. (#34567)
- core: Fix incorrect error message when using in invalid
iterator
argument within a dynamic block. (#34751) - core: Fixed edge-case bug that could cause loss of floating point precision when round-tripping due to incorrectly using a MessagePack integer to represent a large non-integral number. (#24576)
- config: Converting from an unknown map value to an object type now correctly handles the situation where the map element type disagrees with an optional attribute of the target type, since when a map value is unknown we don't yet know which keys it has and thus cannot predict what subset of the elements will get converted as attributes in the resulting object. (#34756)
- cloud: Fixed unparsed color codes in policy failure error messages. (#34473)
Previous Releases
For information on prior major and minor releases, see their changelogs: