opentofu/internal/configs
Alisdair McDiarmid 551f6316fa Do not apply type defaults to null values
Applying object type defaults to null values can convert null to an
object with partial attributes. This means that even a specified default
value of null will not remain null after variable evaluation.

In turn, the result can then be invalid, if not all attributes in an
object type have defaults specified.

This commit skips the type default application step during config load
and variable evaluation if the default or given value is null of any
type. We still perform type conversion.
2022-09-15 15:32:36 -04:00
..
configload build: Use Go 1.19 2022-08-22 10:59:12 -07:00
configschema validate deprecated attrs from static traversals 2022-08-08 09:58:11 -04:00
hcl2shim Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
testdata Do not apply type defaults to null values 2022-09-15 15:32:36 -04:00
backend.go Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
checks.go configs: Fix check block configuration diagnostics 2022-06-21 12:13:45 -04:00
cloud.go Add cloud {} configuration block for Terraform Cloud 2021-10-28 19:29:09 -05:00
compat_shim.go Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
config_build_test.go configs: Refined error messages for mismatched provider passing 2022-03-10 10:05:56 -08:00
config_build.go configs: Refined error messages for mismatched provider passing 2022-03-10 10:05:56 -08:00
config_test.go check for duplicate defaults from resource names 2022-06-15 13:32:30 -04:00
config.go backend/local: Check dependency lock consistency before any operations 2021-10-01 14:43:58 -07:00
depends_on.go Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
doc.go Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
escaping_blocks_test.go Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
experiments_test.go Experiments supported only in alpha/dev builds 2022-06-17 14:46:07 -07:00
experiments.go configs: Show tailored message for optional attrs experiment 2022-07-01 09:08:12 -07:00
module_call_test.go Use hashicorp/terraform-registry-address as a decoupled library (#28338) 2022-07-08 14:46:29 +01:00
module_call.go addrs: Expose the registry address parser's error messages 2021-11-30 15:46:16 -08:00
module_merge_body.go Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
module_merge_test.go add failing test for IgnoreAllChanges override 2021-11-01 19:00:54 +00:00
module_merge.go IgnoreAllChanges should override during merge 2021-11-01 19:08:30 +00:00
module_test.go build: Use Go 1.19 2022-08-22 10:59:12 -07:00
module.go Allow cloud block overrides 2021-10-28 19:29:09 -05:00
moved_test.go normalise test names 2021-11-14 21:51:53 +00:00
moved.go configs: For Moved blocks, use addrs.MoveEndpoint instead of addrs.Target 2021-07-01 08:28:02 -07:00
named_values.go Do not apply type defaults to null values 2022-09-15 15:32:36 -04:00
parser_config_dir_test.go configs: valid-modules test ignores experimental features warning 2021-07-01 08:28:02 -07:00
parser_config_dir.go Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
parser_config_test.go configs: Decode preconditions and postconditions 2022-01-28 11:00:29 -05:00
parser_config.go Experiments supported only in alpha/dev builds 2022-06-17 14:46:07 -07:00
parser_test.go Refactoring of module source addresses and module installation 2021-06-03 08:50:34 -07:00
parser_values_test.go Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
parser_values.go Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
parser.go Experiments supported only in alpha/dev builds 2022-06-17 14:46:07 -07:00
provider_meta.go Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
provider_requirements_test.go addrs: Rename DefaultRegistryHost to DefaultProviderRegistryHost 2021-06-03 08:50:34 -07:00
provider_requirements.go de-linting 2021-09-01 11:36:21 -04:00
provider_test.go Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
provider_validation.go fix: validate implied provider names in submodules (#31573) 2022-08-05 20:44:52 +01:00
provider.go build: Use Go 1.19 2022-08-22 10:59:12 -07:00
provisioner.go Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
provisioneronfailure_string.go Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
provisionerwhen_string.go Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
resource.go core: Defer on transitive dependencies for data resources with conditions 2022-05-11 11:01:38 -07:00
synth_body_test.go Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
synth_body.go Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
util.go Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
variable_type_hint.go build: Use Go 1.19 2022-08-22 10:59:12 -07:00
variabletypehint_string.go Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
version_constraint.go Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00