-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
terraform: configure provider aliases in the new apply graph
Found via a shadow graph failure: Provider aliases weren't being configured by the new apply graph. This was caused by the transform that attaches configs to provider nodes not being able to handle aliases and therefore not attaching a config. Added a test to this and fixed it.
- Loading branch information
Showing
4 changed files
with
81 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
terraform/test-fixtures/apply-provider-alias-configure/main.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
provider "another" { | ||
foo = "bar" | ||
} | ||
|
||
provider "another" { | ||
alias = "two" | ||
foo = "bar" | ||
} | ||
|
||
resource "another_instance" "foo" {} | ||
resource "another_instance" "bar" { provider = "another.two" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters