terraform/configs
Martin Atkins 5dd6b839d0 configs: Export MergeBodies and new SynthBody function
We have a few special use-cases in Terraform where an object is
constructed from a mixture of different sources, such as a configuration
file, command line arguments, and environment variables.

To represent this within the HCL model, we introduce a new "synthetic"
HCL body type that just represents a map of values that are interpreted
as attributes.

We then export the previously-private MergeBodies function to allow the
synthetic body to be used as an override for a "real" body, which then
allows us to combine these various sources together while still retaining
the proper source location information for each individual attribute.

Since a synthetic body doesn't actually exist in configuration, it does
not produce source locations that can be turned into source snippets but
we can still use placeholder strings to help the user to understand
which of the many different sources a particular value came from.
2018-10-16 18:24:47 -07:00
..
configload Add a `CredentialsForHost` method to disco.Disco 2018-08-03 11:29:11 +02:00
test-fixtures configs: allow full type constraints for variables 2018-03-08 16:23:35 -08:00
backend.go configs: Parser.LoadConfigFile 2018-02-15 15:56:37 -08:00
compat_shim.go configs: Disable deprecation warning for quoted keywords/references 2018-03-08 15:42:47 -08:00
config.go configs/configload: package for loading configurations 2018-02-15 15:56:38 -08:00
config_build.go configs: BuildConfig sorts child modules by name 2018-02-15 15:56:38 -08:00
config_build_test.go configs/configload: package for loading configurations 2018-02-15 15:56:38 -08: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: Parser.LoadConfigDir 2018-02-15 15:56:37 -08:00
module_call.go configs: allow overrides files to omit args that primary files can't 2018-02-15 15:56:38 -08:00
module_merge.go configs: Export MergeBodies and new SynthBody function 2018-10-16 18:24:47 -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: allow full type constraints for variables 2018-03-08 16:23:35 -08:00
parser.go configs: Parser type 2018-02-15 15:56:36 -08:00
parser_config.go configs: allow full type constraints for variables 2018-03-08 16:23:35 -08:00
parser_config_dir.go configs: allow overrides files to omit args that primary files can't 2018-02-15 15:56:38 -08:00
parser_config_dir_test.go configs: quoted keywords/references are warnings, not errors 2018-02-15 15:56:39 -08:00
parser_config_test.go configs: allow full type constraints for variables 2018-03-08 16:23:35 -08:00
parser_test.go configs: Implementation of mergeBody 2018-02-15 15:56:38 -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: Parser.LoadConfigDir 2018-02-15 15:56:37 -08:00
provisioner.go configs: quoted keywords/references are warnings, not errors 2018-02-15 15:56:39 -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: highlight resource name in diags when invalid 2018-03-08 15:41:19 -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: Parser.LoadConfigFile 2018-02-15 15:56:37 -08:00