Skip to content

Commit

Permalink
TestAssertS3BucketPolicyExists fix
Browse files Browse the repository at this point in the history
  • Loading branch information
denis256 committed Apr 24, 2023
1 parent 57a78b4 commit 926e08b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/aws/s3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func TestAssertS3BucketPolicyExists(t *testing.T) {
logger.Logf(t, "Random values selected. Region = %s, Id = %s\n", region, id)

s3BucketName := "gruntwork-terratest-" + strings.ToLower(id)
exampleBucketPolicy := fmt.Sprintf(`{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":["*"]},"Action":"s3:Get*","Resource":"arn:aws:s3:::%s/*","Condition":{"Bool":{"aws:SecureTransport":"false"}}}]}`, s3BucketName)
exampleBucketPolicy := fmt.Sprintf(`{"Version":"2012-10-17","Statement":[{"Effect":"Deny","Principal":{"AWS":["*"]},"Action":"s3:Get*","Resource":"arn:aws:s3:::%s/*","Condition":{"Bool":{"aws:SecureTransport":"false"}}}]}`, s3BucketName)

CreateS3Bucket(t, region, s3BucketName)
defer DeleteS3Bucket(t, region, s3BucketName)
Expand Down

0 comments on commit 926e08b

Please sign in to comment.