terraform/configs/testdata/valid-modules
Alisdair McDiarmid dcb8b45e0f configs: Fix for resources with implied providers
Previously, resources without explicit provider configuration (i.e. a
`provider =` attribute) would be assigned a default provider based upon
the resource type. For example, a resource `foo_bar` would be assigned
provider `hashicorp/foo`.

This behaviour did not work well with community or partner providers,
with sources configured in `terraform.required_providers` blocks. With
the following configuration:

    terraform {
      required_providers {
        foo = {
          source = "acme/foo"
        }
      }
    }

    resource foo_bar "a" { }

the resource would be configured with the `hashicorp/foo` provider.

This commit fixes this implied provider behaviour. First we look for a
provider with local name matching the resource type in the module's
required providers map. If one is found, this provider is assigned to
the resource. Otherwise, we still fall back to a default provider.
2020-04-28 14:54:31 -04:00
..
empty
implied-providers configs: Fix for resources with implied providers 2020-04-28 14:54:31 -04:00
nested-providers-fqns terraform: large refactor to use Provider from configs.Resource (#24396) 2020-03-18 08:58:20 -04:00
override-dynamic-block-base
override-dynamic-block-override
override-module
override-output-sensitive
override-resource-provider configs: attach provider fqn to Resource (#24382) 2020-03-16 14:36:16 -04:00
override-variable
providers-fqns terraform: provider source test (#24342) 2020-03-12 12:00:00 -04:00
required-providers-after-resource configs: Simplify required_providers blocks 2020-04-24 13:44:08 -04:00
required-providers-overrides configs: Simplify required_providers blocks 2020-04-24 13:44:08 -04:00