dcb8b45e0f
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. |
||
---|---|---|
.. | ||
empty | ||
implied-providers | ||
nested-providers-fqns | ||
override-dynamic-block-base | ||
override-dynamic-block-override | ||
override-module | ||
override-output-sensitive | ||
override-resource-provider | ||
override-variable | ||
providers-fqns | ||
required-providers-after-resource | ||
required-providers-overrides |