opentofu/internal/configs/testdata
Alisdair McDiarmid 650380f3ae configs: Add default argument to optional()
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.
2022-05-31 12:11:15 -04:00
..
config-build Refactoring of module source addresses and module installation 2021-06-03 08:50:34 -07:00
config-diagnostics configs: Refined error messages for mismatched provider passing 2022-03-10 10:05:56 -08:00
dir-empty Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
error-files configs: Validate pre/postcondition self-refs 2022-02-03 09:37:22 -05:00
escaping-blocks Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
experiments Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
invalid-files parse replace_triggered_by in resource configs 2022-04-20 09:17:10 -04:00
invalid-modules Conclude preconditions/postconditions experiment 2022-04-04 15:54:40 -04:00
nested-backend-warning Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
nested-cloud-warning Add cloud {} configuration block for Terraform Cloud 2021-10-28 19:29:09 -05:00
nested-errors Refactoring of module source addresses and module installation 2021-06-03 08:50:34 -07:00
provider-reqs Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
providers-explicit-fqn Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
valid-files parse replace_triggered_by in resource configs 2022-04-20 09:17:10 -04:00
valid-modules add failing test for IgnoreAllChanges override 2021-11-01 19:00:54 +00:00
warning-files configs: Add default argument to optional() 2022-05-31 12:11:15 -04:00