terraform/configs
Martin Atkins 4061cbed38 internal/getproviders: A new shared model for provider requirements
We've been using the models from the "moduledeps" package to represent our
provider dependencies everywhere since the idea of provider dependencies
was introduced in Terraform 0.10, but that model is not convenient to use
for any use-case other than the "terraform providers" command that needs
individual-module-level detail.

To make things easier for new codepaths working with the new-style
provider installer, here we introduce a new model type
getproviders.Requirements which is based on the type the new installer was
already taking as its input. We have new methods in the states, configs,
and earlyconfig packages to produce values of this type, and a helper
to merge Requirements together so we can combine config-derived and
state-derived requirements together during installation.

The advantage of this new model over the moduledeps one is that all of
recursive module walking is done up front and we produce a simple, flat
structure that is more convenient for the main use-cases of selecting
providers for installation and then finding providers in the local cache
to use them for other operations.

This new model is _not_ suitable for implementing "terraform providers"
because it does not retain module-specific requirement details. Therefore
we will likely keep using moduledeps for "terraform providers" for now,
and then possibly at a later time consider specializing the moduledeps
logic for only what "terraform providers" needs, because it seems to be
the only use-case that needs to retain that level of detail.
2020-03-27 09:01:32 -07:00
..
configload configs: use local set of go-getter detectors 2020-01-07 09:38:46 -08:00
configschema Add support for provider metadata to modules. (#22583) 2020-03-05 16:53:24 -08:00
hcl2shim vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
testdata internal/getproviders: A new shared model for provider requirements 2020-03-27 09:01:32 -07:00
backend.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
compat_shim.go configs: Warn for deprecated interpolation and quoted type constraints 2019-11-13 07:55:55 -08:00
config.go internal/getproviders: A new shared model for provider requirements 2020-03-27 09:01:32 -07:00
config_build.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
config_build_test.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
config_test.go internal/getproviders: A new shared model for provider requirements 2020-03-27 09:01:32 -07:00
depends_on.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
doc.go configs: Additional guidance in doc.go 2018-02-15 15:56:39 -08:00
experiments.go config: Allow module authors to specify validation rules for variables 2020-01-10 15:23:25 -08:00
experiments_test.go experiments: a mechanism for opt-in experimental language features 2019-12-10 09:27:05 -08:00
module.go terraform: large refactor to use Provider from configs.Resource (#24396) 2020-03-18 08:58:20 -04:00
module_call.go enable count and for_each in configuration 2020-03-25 17:03:06 -04:00
module_call_test.go enable count and for_each in configuration 2020-03-25 17:03:06 -04:00
module_merge.go configs: attach provider fqn to Resource (#24382) 2020-03-16 14:36:16 -04:00
module_merge_body.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
module_merge_test.go addrs: Provider.IsLegacy and IsDefault functions 2020-03-23 09:50:35 -04:00
module_test.go addrs: Provider.IsLegacy and IsDefault functions 2020-03-23 09:50:35 -04:00
named_values.go config: Allow module authors to specify validation rules for variables 2020-01-10 15:23:25 -08:00
parser.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
parser_config.go Add support for provider metadata to modules. (#22583) 2020-03-05 16:53:24 -08:00
parser_config_dir.go fix diagnostics handling 2019-11-21 09:14:50 -05:00
parser_config_dir_test.go move IsEmptyDir to configs package 2019-07-18 13:07:10 -04:00
parser_config_test.go fix comment text 2020-02-13 20:46:48 -05:00
parser_test.go terraform: provider source test (#24342) 2020-03-12 12:00:00 -04:00
parser_values.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07: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 Initial steps towards AbsProviderConfig/LocalProviderConfig separation (#23978) 2020-01-31 08:23:07 -05:00
provider_meta.go Add support for provider metadata to modules. (#22583) 2020-03-05 16:53:24 -08:00
provider_requirements.go terraform: provider source test (#24342) 2020-03-12 12:00:00 -04:00
provider_requirements_test.go terraform: provider source test (#24342) 2020-03-12 12:00:00 -04:00
provider_test.go terraform: provider source test (#24342) 2020-03-12 12:00:00 -04:00
provisioner.go convert destroy provisioner warnings to errors 2020-02-13 15:42:10 -05:00
provisioneronfailure_string.go stringer: Regenerate files with latest version 2019-05-13 15:34:27 +01:00
provisionerwhen_string.go stringer: Regenerate files with latest version 2019-05-13 15:34:27 +01:00
resource.go terraform: large refactor to use Provider from configs.Resource (#24396) 2020-03-18 08:58:20 -04:00
synth_body.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
synth_body_test.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
util.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
variable_type_hint.go Version tools per Go convention under tools.go 2019-10-17 22:23:39 +02:00
variabletypehint_string.go stringer: Regenerate files with latest version 2019-05-13 15:34:27 +01:00
version_constraint.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00