mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
The optional modifier previously accepted a single argument: the attribute type. This commit adds an optional second argument, which specifies a default value for the attribute. To record the default values for a variable's type, we use a separate parallel structure of `typeexpr.Defaults`, rather than extending `cty.Type` to include a `cty.Value` of defaults (which may in turn include a `cty.Type` with defaults, and so on, and so forth). The new `typeexpr.TypeConstraintWithDefaults` returns a type constraint and defaults value. Defaults will be `nil` unless there are default values specified somewhere in the variable's type. |
||
---|---|---|
.. | ||
config-build | ||
config-diagnostics | ||
dir-empty | ||
error-files | ||
escaping-blocks | ||
experiments | ||
invalid-files | ||
invalid-modules | ||
nested-backend-warning | ||
nested-cloud-warning | ||
nested-errors | ||
provider-reqs | ||
providers-explicit-fqn | ||
valid-files | ||
valid-modules | ||
warning-files |