terraform/configs/test-fixtures/valid-files
Martin Atkins f77e7a61b0 various: helpers for collecting necessary provider types
Since schemas are required to interpret provider, resource, and
provisioner attributes in configs, states, and plans, these helpers intend
to make it easier to gather up the the necessary provider types in order
to preload all of the needed schemas before beginning further processing.

Config.ProviderTypes returns directly the list of provider types, since
at this level further detail is not useful: we've not yet run the
provider allocation algorithm, and so the only thing we can reliably
extract here is provider types themselves.

State.ProviderAddrs and Plan.ProviderAddrs each return a list of
absolute provider addresses, which can then be turned into a list of
provider types using the new helper providers.AddressedTypesAbs.

Since we're already using configs.Config throughout core, this also
updates the terraform.LoadSchemas helper to use Config.ProviderTypes
to find the necessary providers, rather than implementing its own
discovery logic. states.State is not yet plumbed in, so we cannot yet
use State.ProviderAddrs to deal with the state but there's a TODO comment
to remind us to update that in a later commit when we swap out
terraform.State for states.State.

A later commit will probably refactor this further so that we can easily
obtain schema for the providers needed to interpret a plan too, but that
is deferred here because further work is required to make core work with
the new plan types first. At that point, terraform.LoadSchemas may become
providers.LoadSchemas with a different interface that just accepts lists
of provider and provisioner names that have been gathered by the caller
using these new helpers.
2018-10-16 18:50:29 -07:00
..
backend.tf
data-sources.tf
empty.tf
empty.tf.json
locals.tf
locals.tf.json
module-calls.tf configs: parse the "providers" map for module calls 2018-10-16 18:44:26 -07:00
outputs.tf
provider-configs.tf
providers-explicit-implied.tf various: helpers for collecting necessary provider types 2018-10-16 18:50:29 -07:00
required-providers.tf
required-version.tf
resources-dependson-quoted.tf configs: quoted keywords/references are warnings, not errors 2018-02-15 15:56:39 -08:00
resources-ignorechanges-all-legacy.tf configs: support ignore_changes wildcards 2018-02-15 15:56:39 -08:00
resources-ignorechanges-all-legacy.tf.json configs: support ignore_changes wildcards 2018-02-15 15:56:39 -08:00
resources-ignorechanges-all.tf configs: support ignore_changes wildcards 2018-02-15 15:56:39 -08:00
resources-ignorechanges-all.tf.json configs: support ignore_changes wildcards 2018-02-15 15:56:39 -08:00
resources-ignorechanges-quoted.tf configs: quoted keywords/references are warnings, not errors 2018-02-15 15:56:39 -08:00
resources-provisioner-onfailure-quoted.tf configs: quoted keywords/references are warnings, not errors 2018-02-15 15:56:39 -08:00
resources-provisioner-when-quoted.tf configs: quoted keywords/references are warnings, not errors 2018-02-15 15:56:39 -08:00
resources.tf
variable-type-quoted.tf configs: quoted keywords/references are warnings, not errors 2018-02-15 15:56:39 -08:00
variables.tf configs: allow full type constraints for variables 2018-03-08 16:23:35 -08:00
variables.tf.json