Skip to content

Releases: hashicorp/terraform

v1.8.2

24 Apr 10:26
232035b
Compare
Choose a tag to compare

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 the count and for_each meta attributes. (#35047)
  • terraform test: Restore TF_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 like TF_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

17 Apr 10:13
99a5bb2
Compare
Choose a tag to compare

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

10 Apr 19:02
Compare
Choose a tag to compare

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 the jsonencode 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, and encode_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 to false 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

v1.9.0-alpha20240404 Pre-release
Pre-release

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 with go-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 to terraform plan, permits count and for_each arguments in module, resource, and data 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

04 Apr 08:02
8b68653
Compare
Choose a tag to compare
v1.8.0-rc2 Pre-release
Pre-release

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 the jsonencode 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, and encode_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 to false 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

20 Mar 20:54
Compare
Choose a tag to compare
v1.8.0-rc1 Pre-release
Pre-release

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 the jsonencode 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, and encode_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 to false 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.7.5

13 Mar 22:46
Compare
Choose a tag to compare

1.7.5 (March 13, 2024)

BUG FIXES:

  • backend/s3: When using s3 backend and encountering a network issue, the retry code would fail with "failed to rewind transport stream for retry". Now the retry should be successful. (#34796)

v1.8.0-beta1

v1.8.0-beta1 Pre-release
Pre-release

1.8.0-beta1 (March 6, 2024)

UPGRADE NOTES:

If you are upgrading from Terraform v1.7 or earlier, please refer to
the Terraform v1.8 Upgrade Guide.

  • backend/s3: The use_legacy_workflow argument has been removed to encourage consistency with the AWS SDKs. The backend will now search for credentials in the same order as the default provider chain in the AWS SDKs and AWS CLI.

NEW FEATURES:

  • Providers can now implement functions which can be used from within the Terraform configuration language. The syntax for calling a provider supplied function is provider::provider_name::function_name(). (#34394)
  • Providers can now implement move operations between resource types, both from resource types defined by the provider and defined by other providers. Check provider documentation for supported cross-resource-type moves.
  • issensitive function added to detect if a value is marked as sensitive

ENHANCEMENTS:

  • 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 to false then wrapping automations should ideally encourage an operator to run another plan/apply round to continue making progress toward convergence.

  • Improved plan diff rendering for lists to display item-level differences on lists with unchanged length.

  • terraform provider 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)

  • terraform test: File-level variables can now reference global variables. (#34699)

  • In import-generated code represent JSON values in HCL instead of as strings

  • built-in "terraform" provider: new tfvarsdecode, tfvarsencode, and exprencode functions, for unusual situations where it's helpful to manually generate or read from Terraform's "tfvars" format. (#34718)

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 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-alpha20240228

v1.8.0-alpha20240228 Pre-release
Pre-release

1.8.0-alpha20240228 (February 28, 2024)

UPGRADE NOTES:

  • The first plan after upgrading may show resource updates with no apparent changes if -refresh-only or -refresh=false is used. The fix introduced for #34567 may require rewriting the state for some resources, which will be done automatically during the first normal plan and apply operation.

NEW FEATURES:

  • Providers can now implement functions which can be used from within the Terraform configuration language. The syntax for calling a provider supplied function is provider::provider_name::function_name(). (#34394)
  • Providers can now implement move operations between resource types, both from resource types defined by the provider and defined by other providers. Check provider documentation for supported cross-resource-type moves.
  • issensitive function added to detect if a value is marked as sensitive

ENHANCEMENTS:

  • 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 to false then wrapping automations should ideally encourage an operator to run another plan/apply round to continue making progress toward convergence.

  • Improved plan diff rendering for lists to display item-level differences on lists with unchanged length.

  • terraform provider 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)

  • terraform test: File-level variables can now reference global variables. (#34699)

  • In import-generated code represent JSON values in HCL instead of as strings

  • built-in "terraform" provider: new tfvarsdecode, tfvarsencode, and exprencode functions, for unusual situations where it's helpful to manually generate or read from Terraform's "tfvars" format. (#34718)

BUG FIXES:

  • core: Sensitive values will now be tracked more accurately in state and plans, preventing unexpected updates with no apparent changes (#34567)
  • cloud: Fixed unparsed color codes in policy failure error messages #34473

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 with go-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 language-level experiment unknown_instances permits count and for_each arguments in module, resource, and data blocks to have unknown values.

    This is at an early stage and so currently setting these arguments to unknown values will only yield broken behavior, and so it's not yet useful to participate in this experiment. Future work will improve support for this new possibility, gradually making this experiment viable.

Previous Releases

For information on prior major and minor releases, see their changelogs:

v1.7.4

21 Feb 20:19
Compare
Choose a tag to compare

1.7.4 (February 21, 2024)

BUG FIXES:

  • terraform test: Fix automatic loading of variable files within the test directory on windows platforms. (#34666)
  • plan renderer: Very large numbers (> 2^63) will no longer be truncated in the human-readable plan. (#34702)