Terraform 1.9 Released: Cross-Object Variable Validation
Terraform 1.9 let input-variable validation rules reference other objects, added a templatestring function for dynamic templates, and improved plan performance for large configurations.
Historical Archive. This article documents an event from 2024 and is preserved with its original date for reference. It is not current news, and details may have changed since publication.
What happened
Terraform 1.9 was released on June 26, 2024, according to the official Terraform CHANGELOG on GitHub. As a minor release under the version 1 line, it preserved backward compatibility per HashiCorp's compatibility promises while adding new language capabilities and performance improvements.
Cross-object variable validation
The headline feature was that input-variable validation rules can now refer to other objects. Previously a validation rule could refer only to the variable being validated; in 1.9 the rules became general expressions, similar to those elsewhere in a module, that can reference other input variables and objects such as data resources. This let module authors express richer, cross-cutting validation constraints.
The templatestring function
Terraform 1.9 added a new built-in templatestring function, similar to templatefile but designed to render templates obtained dynamically, such as from a data-resource result, rather than from a file on disk. This made it easier to work with templates that are computed at plan or apply time.
Enhancements and fixes
The release improved graph-building performance for configurations with an extremely large number of resource blocks, added a -json option to terraform init for machine-readable output, let terraform test pass sensitive values while preserving dynamic sensitivity, and allowed removed blocks to declare destroy-time provisioners. It also added basic multi-line input support to terraform console and reduced state copying for better performance with many resources.
Why it mattered
Terraform 1.9 sharpened the language's expressiveness and scaled better for large infrastructures. Cross-object variable validation in particular closed a long-standing gap, letting authors enforce more sophisticated guardrails, while performance work kept Terraform practical for the very large configurations common in modern cloud estates.
Related on Skillo
See also: Terraform 1.5 and import blocks.
Sources
Published date reflects the original event date (2024-06-26). This article is original Skillo editorial written from the sources above; facts were verified in September 2026.
Written by
Skillo Staff
0 Comments
Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.