Skip to content

Commit

Permalink
Merge pull request #15664 from terraform-providers/t-gov-hardarn-prov…
Browse files Browse the repository at this point in the history
…ider

tests/provider: Fix hardcoded ARN (provider)
  • Loading branch information
YakDriver authored Oct 16, 2020
2 parents 4af92cb + 62ff7f5 commit 2a44d68
Showing 1 changed file with 27 additions and 9 deletions.
36 changes: 27 additions & 9 deletions aws/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1420,9 +1420,11 @@ provider "aws" {
}
}
data "aws_partition" "provider_test" {}
# Required to initialize the provider
data "aws_arn" "test" {
arn = "arn:aws:s3:::test"
arn = "arn:${data.aws_partition.provider_test.partition}:s3:::test"
}
`, endpoints)
}
Expand All @@ -1439,9 +1441,11 @@ provider "aws" {
skip_requesting_account_id = true
}
data "aws_partition" "provider_test" {}
# Required to initialize the provider
data "aws_arn" "test" {
arn = "arn:aws:s3:::test"
arn = "arn:${data.aws_partition.provider_test.partition}:s3:::test"
}
`
}
Expand All @@ -1456,9 +1460,11 @@ provider "aws" {
skip_requesting_account_id = true
}
data "aws_partition" "provider_test" {}
# Required to initialize the provider
data "aws_arn" "test" {
arn = "arn:aws:s3:::test"
arn = "arn:${data.aws_partition.provider_test.partition}:s3:::test"
}
`
}
Expand All @@ -1477,9 +1483,11 @@ provider "aws" {
skip_requesting_account_id = true
}
data "aws_partition" "provider_test" {}
# Required to initialize the provider
data "aws_arn" "test" {
arn = "arn:aws:s3:::test"
arn = "arn:${data.aws_partition.provider_test.partition}:s3:::test"
}
`, tagPrefix1)
}
Expand All @@ -1498,9 +1506,11 @@ provider "aws" {
skip_requesting_account_id = true
}
data "aws_partition" "provider_test" {}
# Required to initialize the provider
data "aws_arn" "test" {
arn = "arn:aws:s3:::test"
arn = "arn:${data.aws_partition.provider_test.partition}:s3:::test"
}
`, tagPrefix1, tagPrefix2)
}
Expand All @@ -1515,9 +1525,11 @@ provider "aws" {
skip_requesting_account_id = true
}
data "aws_partition" "provider_test" {}
# Required to initialize the provider
data "aws_arn" "test" {
arn = "arn:aws:s3:::test"
arn = "arn:${data.aws_partition.provider_test.partition}:s3:::test"
}
`
}
Expand All @@ -1536,9 +1548,11 @@ provider "aws" {
skip_requesting_account_id = true
}
data "aws_partition" "provider_test" {}
# Required to initialize the provider
data "aws_arn" "test" {
arn = "arn:aws:s3:::test"
arn = "arn:${data.aws_partition.provider_test.partition}:s3:::test"
}
`, tag1)
}
Expand All @@ -1557,9 +1571,11 @@ provider "aws" {
skip_requesting_account_id = true
}
data "aws_partition" "provider_test" {}
# Required to initialize the provider
data "aws_arn" "test" {
arn = "arn:aws:s3:::test"
arn = "arn:${data.aws_partition.provider_test.partition}:s3:::test"
}
`, tag1, tag2)
}
Expand All @@ -1575,9 +1591,11 @@ provider "aws" {
skip_requesting_account_id = true
}
data "aws_partition" "provider_test" {}
# Required to initialize the provider
data "aws_arn" "test" {
arn = "arn:aws:s3:::test"
arn = "arn:${data.aws_partition.provider_test.partition}:s3:::test"
}
`, region)
}
Expand Down

0 comments on commit 2a44d68

Please sign in to comment.