mirror of https://github.com/hashicorp/terraform
The ProviderConfigTransformer was using only the provider FQN to attach a provider configuration to the provider, but what it needs to do is find the local name for the given provider FQN (which may not match the type name) and use that when searching for matching provider configuration. Fixes #26556 This will also be backported to the v0.13 branch.pull/26587/head
parent
8a4c49313e
commit
ca61e4e313
@ -0,0 +1,20 @@
|
||||
# This test verifies that the provider local name, local config and fqn map
|
||||
# together properly when the local name does not match the type.
|
||||
|
||||
terraform {
|
||||
required_providers {
|
||||
arbitrary = {
|
||||
source = "hashicorp/aws"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# hashicorp/test has required provider config attributes. This "arbitrary"
|
||||
# provider configuration block should map to hashicorp/test.
|
||||
provider "arbitrary" {
|
||||
required_attribute = "bloop"
|
||||
}
|
||||
|
||||
resource "aws_instance" "test" {
|
||||
provider = "arbitrary"
|
||||
}
|
||||
Loading…
Reference in new issue