Skip to content

Commit

Permalink
Merge pull request #15743 from terraform-providers/t-gov-hardarn-medi…
Browse files Browse the repository at this point in the history
…a-store

tests/provider: Fix hardcoded ARN (Media Store*)
  • Loading branch information
YakDriver authored Oct 21, 2020
2 parents 471eab4 + 1ae0b60 commit c50618e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions aws/resource_aws_media_store_container_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ data "aws_region" "current" {}
data "aws_caller_identity" "current" {}
data "aws_partition" "current" {}
resource "aws_media_store_container" "test" {
name = "tf_mediastore_%s"
}
Expand All @@ -118,10 +120,10 @@ resource "aws_media_store_container_policy" "test" {
"mediastore:*"
],
"Principal": {
"AWS": "arn:aws:iam::${data.aws_caller_identity.current.account_id}:root"
"AWS": "arn:${data.aws_partition.current.partition}:iam::${data.aws_caller_identity.current.account_id}:root"
},
"Effect": "Allow",
"Resource": "arn:aws:mediastore:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:container/${aws_media_store_container.test.name}/*",
"Resource": "arn:${data.aws_partition.current.partition}:mediastore:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:container/${aws_media_store_container.test.name}/*",
"Condition": {
"Bool": {
"aws:SecureTransport": "true"
Expand Down

0 comments on commit c50618e

Please sign in to comment.