· javascript
OpenTofu 1.13 Lets Module Authors Reduce Unknown Values at Plan Time
Module authors in OpenTofu 1.13 can now help the planner resolve more expressions during the planning phase through new functions. These functions allow for providing type and value hints for values that remain unknown.
This capability lets the planner determine how many resource instances to create even when not all attributes are known until the apply stage. Martin Atkins, an OpenTofu maintainer, proposed this design in an RFC and merged the implementation in August.
Previously, when using `yamldecode`, an unknown input could yield different types, including null, leaving the planner without a known type or a non-null guarantee. Atkins noted that, in such cases, "... this is just too complex a situation for OpenTofu to infer automatically itself."
The `convert` function addresses this by transforming values to a specified type, thereby giving a `yamldecode` result a known object type even if the YAML input is initially unknown.
For conditional resources, pairing this conversion with `assumenotnull` permits a count expression dependent on nullness to resolve to either zero or one, while the object's internal contents remain uncertain. The author must guarantee the generated YAML always matches the specified type and never presents a null value; failure to do so results in an error during apply.
OpenTofu adopted this design after Terraform released its comparable `convert` function in version 1.15. Atkins later acknowledged that "Terraform has an equivalent feature with syntax exactly like what I proposed here," leading the project to align its implementation.
Beyond this, experimental linting now runs four built-in warning rules, such as `core:unused-variable` and `core:count-instead-enabled`, when using the `-lint=all` flag with `tofu validate`, `tofu plan`, or `tofu apply`.
Version 1.13 also brings several changes, including the removal of Windows Remote Management (WinRM) support from the remote-exec and file provisioners, and it requires macOS 13 Ventura or newer. Furthermore, it is the final series offering official 32-bit builds, though it adds Windows on ARM64 packages.
The project has shortened its development cycle to mirror Go releases and maintains support for the 1.13.x series until August 1, 2027. Version 1.13.2, released on October 21, includes two security fixes addressing excessive CPU use during `tofu init` when connecting to an attacker-controlled HTTP/2 server and filtering compromised intermediate certificates.

