terraform/configs/testdata
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
..
config-build
dir-empty move IsEmptyDir to configs package 2019-07-18 13:07:10 -04:00
error-files convert destroy provisioner warnings to errors 2020-02-13 15:42:10 -05:00
experiments experiments: a mechanism for opt-in experimental language features 2019-12-10 09:27:05 -08:00
invalid-files config: Allow module authors to specify validation rules for variables 2020-01-10 15:23:25 -08:00
invalid-modules config: Allow module authors to specify validation rules for variables 2020-01-10 15:23:25 -08:00
nested-errors
provider-reqs internal/getproviders: A new shared model for provider requirements 2020-03-27 09:01:32 -07:00
providers-explicit-fqn addrs: Stronger validation and normalization of provider namespace/type 2020-02-18 15:42:09 -08:00
valid-files configs: Warn for deprecated interpolation and quoted type constraints 2019-11-13 07:55:55 -08:00
valid-modules terraform: large refactor to use Provider from configs.Resource (#24396) 2020-03-18 08:58:20 -04:00
warning-files convert destroy provisioner warnings to errors 2020-02-13 15:42:10 -05:00