Skip to content

Commit aa3eda7

Browse files
authored
Merge pull request hashicorp#11313 from hashicorp/f-fix-s3bucketpolicy-acctests
provider/aws: Fix S3BucketPolicy Acceptance Tests
2 parents 5222c0f + 191bb15 commit aa3eda7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎builtin/providers/aws/resource_aws_s3_bucket_policy_test.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func TestAccAWSS3BucketPolicy_basic(t *testing.T) {
1616
name := fmt.Sprintf("tf-test-bucket-%d", acctest.RandInt())
1717

1818
expectedPolicyText := fmt.Sprintf(
19-
`{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":"*"},"Action":"s3:*","Resource":["arn:aws:s3:::%s","arn:aws:s3:::%s/*"]}]}`,
19+
`{"Version":"2012-10-17","Statement":[{"Sid": "", "Effect":"Allow","Principal":"*","Action":"s3:*","Resource":["arn:aws:s3:::%s/*","arn:aws:s3:::%s"]}]}`,
2020
name, name)
2121

2222
resource.Test(t, resource.TestCase{
@@ -39,11 +39,11 @@ func TestAccAWSS3BucketPolicy_policyUpdate(t *testing.T) {
3939
name := fmt.Sprintf("tf-test-bucket-%d", acctest.RandInt())
4040

4141
expectedPolicyText1 := fmt.Sprintf(
42-
`{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":"*"},"Action":"s3:*","Resource":["arn:aws:s3:::%s","arn:aws:s3:::%s/*"]}]}`,
42+
`{"Version":"2012-10-17","Statement":[{"Sid": "", "Effect":"Allow","Principal":"*","Action":"s3:*","Resource":["arn:aws:s3:::%s/*","arn:aws:s3:::%s"]}]}`,
4343
name, name)
4444

4545
expectedPolicyText2 := fmt.Sprintf(
46-
`{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":"*"},"Action":["s3:DeleteBucket", "s3:ListBucket", "s3:ListBucketVersions"], "Resource":["arn:aws:s3:::%s","arn:aws:s3:::%s/*"]}]}`,
46+
`{"Version":"2012-10-17","Statement":[{"Sid": "", "Effect":"Allow","Principal":"*","Action":["s3:DeleteBucket", "s3:ListBucket", "s3:ListBucketVersions"], "Resource":["arn:aws:s3:::%s/*","arn:aws:s3:::%s"]}]}`,
4747
name, name)
4848

4949
resource.Test(t, resource.TestCase{

0 commit comments

Comments
 (0)