From 926e08bd461f914ea3f3744b4f03ec8ee5365b0b Mon Sep 17 00:00:00 2001 From: Denis O Date: Mon, 24 Apr 2023 21:45:47 +0000 Subject: [PATCH] TestAssertS3BucketPolicyExists fix --- modules/aws/s3_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/aws/s3_test.go b/modules/aws/s3_test.go index 22b00c11d..dafde4843 100644 --- a/modules/aws/s3_test.go +++ b/modules/aws/s3_test.go @@ -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)