mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-05-01 10:00:39 -04:00
Previously, when applying defaults to an input variable's given value before type conversion, we would permit `null` attribute values to override a specified default. This behaviour is inconsistent with the intent of the type system underlying Terraform, and represented a divergence from the treatment of `null` as equivalent to unset which exists in resources. The same behaviour exists in top-level variable definitions with `nullable = false`, and we consider this to be the preferred behaviour here too. This commit slightly changes default value application such that an explicit `null` attribute value is treated as equivalent to the attribute being missing. Default values for attributes will now replace explicit nulls.