Skip to content

Commit 5da4a4c

Browse files
committed
Remove dummy region from providers
terraform validate wants this, but adding any key inside the provider block other than "alias" appears to actually _define_ a provider instead of allowing one to be passed in from the parent module. In this case, a provider is created from the default profile and the specified region, and this is used _instead_ of the aws.images-staging and aws.images-production providers passed in by the parent module.
1 parent 4ee5ceb commit 5da4a4c

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

providers.tf

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,16 @@
1-
# Default AWS region to use for the AWS providers.
2-
# This is needed to supply `terraform validate` with all of the required
3-
# parameters it needs to check the code.
4-
locals {
5-
aws_region = "us-east-1"
6-
}
7-
81
# This is the default provider that is used to create resources inside
92
# the Users account
103
provider "aws" {
11-
region = local.aws_region
124
}
135

146
# This is the provider that is used to create the role and policy that can
157
# read Parameter Store parameters inside the Images Production account
168
provider "aws" {
17-
region = local.aws_region
18-
alias = "images-production"
9+
alias = "images-production"
1910
}
2011

2112
# This is the provider that is used to create the role and policy that can
2213
# read Parameter Store parameters inside the Images Staging account
2314
provider "aws" {
24-
region = local.aws_region
25-
alias = "images-staging"
15+
alias = "images-staging"
2616
}

0 commit comments

Comments
 (0)