mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 18:01:01 -06:00
core: provider alias inheritance
An aliased provider should not be automatically inherited, nor implicitly instantiated in a module. This test should not have previously passed. Add a proxy provider block to the module and update the provider to match the schema.
This commit is contained in:
parent
46ba98233a
commit
65cd163365
@ -2536,7 +2536,7 @@ func TestContext2Apply_moduleInheritAlias(t *testing.T) {
|
|||||||
p.DiffFn = testDiffFn
|
p.DiffFn = testDiffFn
|
||||||
|
|
||||||
p.ConfigureFn = func(c *ResourceConfig) error {
|
p.ConfigureFn = func(c *ResourceConfig) error {
|
||||||
if _, ok := c.Get("child"); !ok {
|
if _, ok := c.Get("value"); !ok {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
provider "aws" {
|
||||||
|
alias = "eu"
|
||||||
|
}
|
||||||
|
|
||||||
resource "aws_instance" "foo" {
|
resource "aws_instance" "foo" {
|
||||||
provider = "aws.eu"
|
provider = "aws.eu"
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ provider "aws" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
provider "aws" {
|
provider "aws" {
|
||||||
child = "eu"
|
value = "eu"
|
||||||
alias = "eu"
|
alias = "eu"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user