terraform/configs
Martin Atkins 88e76fa9ef configs/configschema: Introduce the NestingGroup mode for blocks
In study of existing providers we've found a pattern we werent previously
accounting for of using a nested block type to represent a group of
arguments that relate to a particular feature that is always enabled but
where it improves configuration readability to group all of its settings
together in a nested block.

The existing NestingSingle was not a good fit for this because it is
designed under the assumption that the presence or absence of the block
has some significance in enabling or disabling the relevant feature, and
so for these always-active cases we'd generate a misleading plan where
the settings for the feature appear totally absent, rather than showing
the default values that will be selected.

NestingGroup is, therefore, a slight variation of NestingSingle where
presence vs. absence of the block is not distinguishable (it's never null)
and instead its contents are treated as unset when the block is absent.
This then in turn causes any default values associated with the nested
arguments to be honored and displayed in the plan whenever the block is
not explicitly configured.

The current SDK cannot activate this mode, but that's okay because its
"legacy type system" opt-out flag allows it to force a block to be
processed in this way anyway. We're adding this now so that we can
introduce the feature in a future SDK without causing a breaking change
to the protocol, since the set of possible block nesting modes is not
extensible.
2019-04-10 14:53:52 -07:00
..
configload copyDir: detect if the module install path is a symlink to a directory (#20603) 2019-03-07 12:59:48 -08:00
configschema configs/configschema: Introduce the NestingGroup mode for blocks 2019-04-10 14:53:52 -07:00
configupgrade configs/configschema: Introduce the NestingGroup mode for blocks 2019-04-10 14:53:52 -07:00
test-fixtures configs: do not panic if module version is a variable (#20681) 2019-03-14 09:12:27 -07:00
backend.go move "configschema" from "config" to "configs" 2018-10-16 18:50:29 -07:00
compat_shim.go configs: Handle object constructor keys when shimming traversals 2018-10-16 18:49:20 -07:00
config.go grammatical updates to comments and docs (#20195) 2019-03-21 14:05:41 -07:00
config_build.go configs: use addrs.Module for module path, rather than []string 2018-10-16 18:46:46 -07:00
config_build_test.go configs/configload: package for loading configurations 2018-02-15 15:56:38 -08:00
config_test.go various: helpers for collecting necessary provider types 2018-10-16 18:50:29 -07:00
depends_on.go configs: quoted keywords/references are warnings, not errors 2018-02-15 15:56:39 -08:00
doc.go configs: Additional guidance in doc.go 2018-02-15 15:56:39 -08:00
module.go configs: Allow looking up resources by resource addresses. 2018-10-16 18:46:46 -07:00
module_call.go configs: Reserve various names for future use 2018-11-26 08:25:03 -08:00
module_call_test.go configs: Reserve various names for future use 2018-11-26 08:25:03 -08:00
module_merge.go configs: Re-unify the ManagedResource and DataResource types 2018-10-16 18:44:26 -07:00
module_merge_body.go configs: Export MergeBodies and new SynthBody function 2018-10-16 18:24:47 -07:00
module_merge_test.go configs: allow full type constraints for variables 2018-03-08 16:23:35 -08:00
named_values.go configs: Reserve various names for future use 2018-11-26 08:25:03 -08:00
parser.go command: 0.12upgrade command 2018-10-16 18:50:29 -07:00
parser_config.go configs: allow full type constraints for variables 2018-03-08 16:23:35 -08:00
parser_config_dir.go configload: Configuration snapshots 2018-10-16 18:50:29 -07:00
parser_config_dir_test.go configs: record the source directory for modules 2018-10-16 18:46:46 -07:00
parser_config_test.go Fix tests after upgrading hcl 2018-11-26 23:38:37 +00:00
parser_test.go configs: Reserve various names for future use 2018-11-26 08:25:03 -08:00
parser_values.go configs: Parser.LoadValuesFile 2018-02-15 15:56:37 -08:00
parser_values_test.go configs: update values file invalid syntax test for new HCL behavior 2018-03-08 11:17:39 -08:00
provider.go configs: Reserve various names for future use 2018-11-26 08:25:03 -08:00
provider_test.go configs: Reserve various names for future use 2018-11-26 08:25:03 -08:00
provisioner.go configs: Reserve various names for future use 2018-11-26 08:25:03 -08:00
provisioneronfailure_string.go configs: stub out main configuration structs 2018-02-15 15:56:37 -08:00
provisionerwhen_string.go configs: stub out main configuration structs 2018-02-15 15:56:37 -08:00
resource.go configs: Reserve various names for future use 2018-11-26 08:25:03 -08:00
synth_body.go configs: Export MergeBodies and new SynthBody function 2018-10-16 18:24:47 -07:00
synth_body_test.go configs: Export MergeBodies and new SynthBody function 2018-10-16 18:24:47 -07:00
util.go configs: allow overrides files to omit args that primary files can't 2018-02-15 15:56:38 -08:00
variable_type_hint.go configs: stub out main configuration structs 2018-02-15 15:56:37 -08:00
variabletypehint_string.go configs: stub out main configuration structs 2018-02-15 15:56:37 -08:00
version_constraint.go configs: do not panic if module version is a variable (#20681) 2019-03-14 09:12:27 -07:00