mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 18:01:01 -06:00
45671a354d
When a resource has no `provider` argument specified, its provider is derived from the implied provider type based on the resource type. For example, a `boop_instance` resource has an implied provider local name of `boop`. Correspondingly, its provider configuration is specified with a `provider "boop"` block. However, users can use the `required_providers` configuration to give a different local name to a given provider than its defined type. For example, a provider may be published at `foobar/beep`, but provide resources such as `boop_instance`. The most convenient way to use this provider is with a `required_providers` map: terraform { required_providers { boop = { source = "foobar/beep" } } } Once that local name is defined, it is used for provider configuration (a `provider "boop"` block, not `provider "beep"`). It should also be used when looking up a resource's provider configuration or provider. This commit fixes a bug with this edge case, where previously we were looking up the local provider configuration block using the resource's assigned provider type. Instead, if no provider argument is specified, we should be using the implied provider type, as that is what binds the resource to the local provider configuration. |
||
---|---|---|
.. | ||
configload | ||
configschema | ||
hcl2shim | ||
testdata | ||
backend.go | ||
compat_shim.go | ||
config_build_test.go | ||
config_build.go | ||
config_test.go | ||
config.go | ||
depends_on.go | ||
doc.go | ||
experiments_test.go | ||
experiments.go | ||
module_call_test.go | ||
module_call.go | ||
module_merge_body.go | ||
module_merge_test.go | ||
module_merge.go | ||
module_test.go | ||
module.go | ||
named_values_test.go | ||
named_values.go | ||
parser_config_dir_test.go | ||
parser_config_dir.go | ||
parser_config_test.go | ||
parser_config.go | ||
parser_test.go | ||
parser_values_test.go | ||
parser_values.go | ||
parser.go | ||
provider_meta.go | ||
provider_requirements_test.go | ||
provider_requirements.go | ||
provider_test.go | ||
provider.go | ||
provisioner.go | ||
provisioneronfailure_string.go | ||
provisionerwhen_string.go | ||
resource.go | ||
synth_body_test.go | ||
synth_body.go | ||
util.go | ||
variable_type_hint.go | ||
variabletypehint_string.go | ||
version_constraint.go |