Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly handle ignored tags for S3 Bucket and Object resources #12013

Merged
merged 6 commits into from
Oct 6, 2020

Conversation

ewbankkit
Copy link
Contributor

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates #11964.
Relates #11916.
Relates #10689.
Relates #7342.

The aws_s3_bucket_object scenario was tested using ignore_tags functionality and the following acceptance test case:

func TestAccAWSS3BucketObject_ignoreTags(t *testing.T) {
       var obj s3.GetObjectOutput
       resourceName := "aws_s3_bucket_object.object"
       rInt := acctest.RandInt()
       key := "test-key"

       resource.ParallelTest(t, resource.TestCase{
               PreCheck:     func() { testAccPreCheck(t) },
               Providers:    testAccProviders,
               CheckDestroy: testAccCheckAWSS3BucketObjectDestroy,
               Steps: []resource.TestStep{
                       {
                               PreConfig: func() {},
                               Config:    testAccProviderConfigIgnoreTagPrefixes1("ignorekey") + testAccAWSS3BucketObjectConfig_withNoTags(rInt, key, "stuff"),
                               Check: resource.ComposeTestCheckFunc(
                                       testAccCheckAWSS3BucketObjectExists(resourceName, &obj),
                                       testAccCheckAWSS3BucketObjectBody(&obj, "stuff"),
                                       testAccCheckAWSS3BucketObjectUpdateTags(resourceName, nil, map[string]string{"ignorekey1": "ignorevalue1"}),
                                       resource.TestCheckResourceAttr(resourceName, "tags.%", "0"),
                               ),
                       },
                       {
                               PreConfig: func() {},
                               Config:    testAccProviderConfigIgnoreTagPrefixes1("ignorekey") + testAccAWSS3BucketObjectConfig_withTags(rInt, key, "stuff"),
                               Check: resource.ComposeTestCheckFunc(
                                       testAccCheckAWSS3BucketObjectExists(resourceName, &obj),
                                       testAccCheckAWSS3BucketObjectBody(&obj, "stuff"),
                                       resource.TestCheckResourceAttr(resourceName, "tags.%", "3"),
                                       resource.TestCheckResourceAttr(resourceName, "tags.Key1", "AAA"),
                                       resource.TestCheckResourceAttr(resourceName, "tags.Key2", "BBB"),
                                       resource.TestCheckResourceAttr(resourceName, "tags.Key3", "CCC"),
                                       testAccCheckAWSS3BucketObjecCheckTags(resourceName, map[string]string{
                                               "ignorekey1": "ignorevalue1",
                                               "Key1":       "AAA",
                                               "Key2":       "BBB",
                                               "Key3":       "CCC",
                                       }),
                               ),
                       },
               },
       })
}

func testAccCheckAWSS3BucketObjectUpdateTags(n string, oldTags, newTags map[string]string) resource.TestCheckFunc {
       return func(s *terraform.State) error {
               rs := s.RootModule().Resources[n]
               s3conn := testAccProvider.Meta().(*AWSClient).s3conn

               return keyvaluetags.S3ObjectUpdateTags(s3conn, rs.Primary.Attributes["bucket"], rs.Primary.Attributes["key"], oldTags, newTags)
       }
}

func testAccCheckAWSS3BucketObjecCheckTags(n string, expectedTags map[string]string) resource.TestCheckFunc {
       return func(s *terraform.State) error {
               rs := s.RootModule().Resources[n]
               s3conn := testAccProvider.Meta().(*AWSClient).s3conn

               got, err := keyvaluetags.S3ObjectListTags(s3conn, rs.Primary.Attributes["bucket"], rs.Primary.Attributes["key"])
               if err != nil {
                       return err
               }

               want := keyvaluetags.New(expectedTags)
               if !reflect.DeepEqual(want, got) {
                       return fmt.Errorf("Incorrect tags, want: %v got: %v", want, got)
               }

               return nil
       }
}

That case fails without the change:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSS3BucketObject_ignoreTags'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSS3BucketObject_ignoreTags -timeout 120m
=== RUN   TestAccAWSS3BucketObject_ignoreTags
=== PAUSE TestAccAWSS3BucketObject_ignoreTags
=== CONT  TestAccAWSS3BucketObject_ignoreTags
--- FAIL: TestAccAWSS3BucketObject_ignoreTags (54.90s)
    testing.go:640: Step 1 error: Check failed: Check 7/7 error: Incorrect tags, want: map[ignorekey1:ignorevalue1 Key1:AAA Key2:BBB Key3:CCC] got: map[Key2:BBB Key1:AAA Key3:CCC]
FAIL
FAIL	github.com/terraform-providers/terraform-provider-aws/aws	54.957s
FAIL
GNUmakefile:25: recipe for target 'testacc' failed
make: *** [testacc] Error 1

and passes after the change:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSS3BucketObject_ignoreTags'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSS3BucketObject_ignoreTags -timeout 120m
=== RUN   TestAccAWSS3BucketObject_ignoreTags
=== PAUSE TestAccAWSS3BucketObject_ignoreTags
=== CONT  TestAccAWSS3BucketObject_ignoreTags
--- PASS: TestAccAWSS3BucketObject_ignoreTags (69.11s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	69.152s

The aws_s3_bucket scenario can be verified with the existing acceptance test cases.

Release note for CHANGELOG:

NONE

Output from acceptance testing:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSS3BucketObject_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSS3BucketObject_ -timeout 120m
=== RUN   TestAccAWSS3BucketObject_noNameNoKey
=== PAUSE TestAccAWSS3BucketObject_noNameNoKey
=== RUN   TestAccAWSS3BucketObject_empty
=== PAUSE TestAccAWSS3BucketObject_empty
=== RUN   TestAccAWSS3BucketObject_source
=== PAUSE TestAccAWSS3BucketObject_source
=== RUN   TestAccAWSS3BucketObject_content
=== PAUSE TestAccAWSS3BucketObject_content
=== RUN   TestAccAWSS3BucketObject_etagEncryption
=== PAUSE TestAccAWSS3BucketObject_etagEncryption
=== RUN   TestAccAWSS3BucketObject_contentBase64
=== PAUSE TestAccAWSS3BucketObject_contentBase64
=== RUN   TestAccAWSS3BucketObject_withContentCharacteristics
=== PAUSE TestAccAWSS3BucketObject_withContentCharacteristics
=== RUN   TestAccAWSS3BucketObject_NonVersioned
=== PAUSE TestAccAWSS3BucketObject_NonVersioned
=== RUN   TestAccAWSS3BucketObject_updates
=== PAUSE TestAccAWSS3BucketObject_updates
=== RUN   TestAccAWSS3BucketObject_updateSameFile
=== PAUSE TestAccAWSS3BucketObject_updateSameFile
=== RUN   TestAccAWSS3BucketObject_updatesWithVersioning
=== PAUSE TestAccAWSS3BucketObject_updatesWithVersioning
=== RUN   TestAccAWSS3BucketObject_kms
=== PAUSE TestAccAWSS3BucketObject_kms
=== RUN   TestAccAWSS3BucketObject_sse
=== PAUSE TestAccAWSS3BucketObject_sse
=== RUN   TestAccAWSS3BucketObject_acl
=== PAUSE TestAccAWSS3BucketObject_acl
=== RUN   TestAccAWSS3BucketObject_metadata
=== PAUSE TestAccAWSS3BucketObject_metadata
=== RUN   TestAccAWSS3BucketObject_storageClass
=== PAUSE TestAccAWSS3BucketObject_storageClass
=== RUN   TestAccAWSS3BucketObject_tags
=== PAUSE TestAccAWSS3BucketObject_tags
=== RUN   TestAccAWSS3BucketObject_tagsLeadingSlash
=== PAUSE TestAccAWSS3BucketObject_tagsLeadingSlash
=== RUN   TestAccAWSS3BucketObject_ObjectLockLegalHoldStartWithNone
=== PAUSE TestAccAWSS3BucketObject_ObjectLockLegalHoldStartWithNone
=== RUN   TestAccAWSS3BucketObject_ObjectLockLegalHoldStartWithOn
=== PAUSE TestAccAWSS3BucketObject_ObjectLockLegalHoldStartWithOn
=== RUN   TestAccAWSS3BucketObject_ObjectLockRetentionStartWithNone
=== PAUSE TestAccAWSS3BucketObject_ObjectLockRetentionStartWithNone
=== RUN   TestAccAWSS3BucketObject_ObjectLockRetentionStartWithSet
=== PAUSE TestAccAWSS3BucketObject_ObjectLockRetentionStartWithSet
=== CONT  TestAccAWSS3BucketObject_noNameNoKey
=== CONT  TestAccAWSS3BucketObject_sse
=== CONT  TestAccAWSS3BucketObject_ObjectLockRetentionStartWithSet
=== CONT  TestAccAWSS3BucketObject_ObjectLockRetentionStartWithNone
=== CONT  TestAccAWSS3BucketObject_ObjectLockLegalHoldStartWithOn
=== CONT  TestAccAWSS3BucketObject_ObjectLockLegalHoldStartWithNone
=== CONT  TestAccAWSS3BucketObject_tagsLeadingSlash
=== CONT  TestAccAWSS3BucketObject_tags
=== CONT  TestAccAWSS3BucketObject_kms
=== CONT  TestAccAWSS3BucketObject_updatesWithVersioning
=== CONT  TestAccAWSS3BucketObject_storageClass
=== CONT  TestAccAWSS3BucketObject_metadata
=== CONT  TestAccAWSS3BucketObject_updateSameFile
=== CONT  TestAccAWSS3BucketObject_updates
=== CONT  TestAccAWSS3BucketObject_NonVersioned
=== CONT  TestAccAWSS3BucketObject_acl
=== CONT  TestAccAWSS3BucketObject_withContentCharacteristics
=== CONT  TestAccAWSS3BucketObject_contentBase64
=== CONT  TestAccAWSS3BucketObject_etagEncryption
=== CONT  TestAccAWSS3BucketObject_content
--- SKIP: TestAccAWSS3BucketObject_NonVersioned (2.18s)
    provider_test.go:1254: skipping tests; TF_ACC_ASSUME_ROLE_ARN must be set
=== CONT  TestAccAWSS3BucketObject_source
--- PASS: TestAccAWSS3BucketObject_noNameNoKey (5.52s)
=== CONT  TestAccAWSS3BucketObject_empty
--- PASS: TestAccAWSS3BucketObject_etagEncryption (41.82s)
--- PASS: TestAccAWSS3BucketObject_content (41.93s)
--- PASS: TestAccAWSS3BucketObject_contentBase64 (43.01s)
--- PASS: TestAccAWSS3BucketObject_sse (43.08s)
--- PASS: TestAccAWSS3BucketObject_withContentCharacteristics (43.14s)
--- PASS: TestAccAWSS3BucketObject_source (40.97s)
--- PASS: TestAccAWSS3BucketObject_empty (38.59s)
--- PASS: TestAccAWSS3BucketObject_kms (66.72s)
--- PASS: TestAccAWSS3BucketObject_updatesWithVersioning (69.71s)
--- PASS: TestAccAWSS3BucketObject_updateSameFile (69.89s)
--- PASS: TestAccAWSS3BucketObject_updates (69.97s)
--- PASS: TestAccAWSS3BucketObject_ObjectLockLegalHoldStartWithOn (71.51s)
--- PASS: TestAccAWSS3BucketObject_metadata (94.24s)
--- PASS: TestAccAWSS3BucketObject_ObjectLockRetentionStartWithNone (96.23s)
--- PASS: TestAccAWSS3BucketObject_acl (97.62s)
--- PASS: TestAccAWSS3BucketObject_ObjectLockLegalHoldStartWithNone (98.68s)
--- PASS: TestAccAWSS3BucketObject_tagsLeadingSlash (122.16s)
--- PASS: TestAccAWSS3BucketObject_ObjectLockRetentionStartWithSet (122.47s)
--- PASS: TestAccAWSS3BucketObject_tags (123.22s)
--- PASS: TestAccAWSS3BucketObject_storageClass (146.78s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	146.860s
$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSS3Bucket_tags'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSS3Bucket_tags -timeout 120m
=== RUN   TestAccAWSS3Bucket_tagsWithNoSystemTags
=== PAUSE TestAccAWSS3Bucket_tagsWithNoSystemTags
=== RUN   TestAccAWSS3Bucket_tagsWithSystemTags
=== PAUSE TestAccAWSS3Bucket_tagsWithSystemTags
=== CONT  TestAccAWSS3Bucket_tagsWithSystemTags
=== CONT  TestAccAWSS3Bucket_tagsWithNoSystemTags
--- PASS: TestAccAWSS3Bucket_tagsWithNoSystemTags (130.64s)
--- PASS: TestAccAWSS3Bucket_tagsWithSystemTags (170.73s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	170.777s
$ make testacc TEST=./aws TESTARGS='-run=TestAccDataSourceAWSS3BucketObject_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccDataSourceAWSS3BucketObject_ -timeout 120m
=== RUN   TestAccDataSourceAWSS3BucketObject_basic
=== PAUSE TestAccDataSourceAWSS3BucketObject_basic
=== RUN   TestAccDataSourceAWSS3BucketObject_readableBody
=== PAUSE TestAccDataSourceAWSS3BucketObject_readableBody
=== RUN   TestAccDataSourceAWSS3BucketObject_kmsEncrypted
=== PAUSE TestAccDataSourceAWSS3BucketObject_kmsEncrypted
=== RUN   TestAccDataSourceAWSS3BucketObject_allParams
=== PAUSE TestAccDataSourceAWSS3BucketObject_allParams
=== RUN   TestAccDataSourceAWSS3BucketObject_ObjectLockLegalHoldOff
=== PAUSE TestAccDataSourceAWSS3BucketObject_ObjectLockLegalHoldOff
=== RUN   TestAccDataSourceAWSS3BucketObject_ObjectLockLegalHoldOn
=== PAUSE TestAccDataSourceAWSS3BucketObject_ObjectLockLegalHoldOn
=== RUN   TestAccDataSourceAWSS3BucketObject_LeadingSlash
=== PAUSE TestAccDataSourceAWSS3BucketObject_LeadingSlash
=== RUN   TestAccDataSourceAWSS3BucketObject_MultipleSlashes
=== PAUSE TestAccDataSourceAWSS3BucketObject_MultipleSlashes
=== CONT  TestAccDataSourceAWSS3BucketObject_basic
=== CONT  TestAccDataSourceAWSS3BucketObject_LeadingSlash
=== CONT  TestAccDataSourceAWSS3BucketObject_MultipleSlashes
=== CONT  TestAccDataSourceAWSS3BucketObject_ObjectLockLegalHoldOn
=== CONT  TestAccDataSourceAWSS3BucketObject_allParams
=== CONT  TestAccDataSourceAWSS3BucketObject_ObjectLockLegalHoldOff
=== CONT  TestAccDataSourceAWSS3BucketObject_kmsEncrypted
=== CONT  TestAccDataSourceAWSS3BucketObject_readableBody
--- PASS: TestAccDataSourceAWSS3BucketObject_basic (63.57s)
--- PASS: TestAccDataSourceAWSS3BucketObject_readableBody (63.59s)
--- PASS: TestAccDataSourceAWSS3BucketObject_LeadingSlash (64.84s)
--- PASS: TestAccDataSourceAWSS3BucketObject_MultipleSlashes (65.54s)
--- PASS: TestAccDataSourceAWSS3BucketObject_allParams (65.54s)
--- PASS: TestAccDataSourceAWSS3BucketObject_ObjectLockLegalHoldOff (65.71s)
--- PASS: TestAccDataSourceAWSS3BucketObject_ObjectLockLegalHoldOn (67.10s)
--- PASS: TestAccDataSourceAWSS3BucketObject_kmsEncrypted (86.80s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	86.874s

@ewbankkit ewbankkit requested a review from a team February 12, 2020 20:21
@ghost ghost added needs-triage Waiting for first response or review from a maintainer. size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Feb 12, 2020
@@ -236,6 +236,23 @@ func (tags KeyValueTags) UrlEncode() string {
return values.Encode()
}

func (tags KeyValueTags) String() string {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useful for acceptance test logging.
I kept to the map[string]string format.

@ewbankkit
Copy link
Contributor Author

Fixed unit test failure (it worked on my machine 😄).

@ewbankkit
Copy link
Contributor Author

Revisit once #13039 is merged.

@ghost ghost added service/s3 Issues and PRs that pertain to the s3 service. size/L Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. labels Apr 30, 2020
@ewbankkit
Copy link
Contributor Author

ewbankkit commented Apr 30, 2020

Now that #13039 has been merged and the functionality released I have added acceptance tests:

With the changes

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSS3BucketObject_ignoreTags' 
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSS3BucketObject_ignoreTags -timeout 120m
=== RUN   TestAccAWSS3BucketObject_ignoreTags
=== PAUSE TestAccAWSS3BucketObject_ignoreTags
=== CONT  TestAccAWSS3BucketObject_ignoreTags
--- PASS: TestAccAWSS3BucketObject_ignoreTags (71.36s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	71.404s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSS3Bucket_ignoreTags'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSS3Bucket_ignoreTags -timeout 120m
=== RUN   TestAccAWSS3Bucket_ignoreTags
=== PAUSE TestAccAWSS3Bucket_ignoreTags
=== CONT  TestAccAWSS3Bucket_ignoreTags
--- PASS: TestAccAWSS3Bucket_ignoreTags (70.25s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	70.292s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSS3Bucket_tagsWithSystemTags'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSS3Bucket_tagsWithSystemTags -timeout 120m
=== RUN   TestAccAWSS3Bucket_tagsWithSystemTags
=== PAUSE TestAccAWSS3Bucket_tagsWithSystemTags
=== CONT  TestAccAWSS3Bucket_tagsWithSystemTags
--- PASS: TestAccAWSS3Bucket_tagsWithSystemTags (188.11s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	188.138s

Without the changes

$ git revert 4972052b9153e2f9eab78a5547869f2c642cb62a
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSS3BucketObject_ignoreTags'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSS3BucketObject_ignoreTags -timeout 120m
=== RUN   TestAccAWSS3BucketObject_ignoreTags
=== PAUSE TestAccAWSS3BucketObject_ignoreTags
=== CONT  TestAccAWSS3BucketObject_ignoreTags
--- FAIL: TestAccAWSS3BucketObject_ignoreTags (56.66s)
    testing.go:669: Step 1 error: Check failed: Check 7/7 error: Incorrect tags, want: map[Key1:AAA Key2:BBB Key3:CCC ignorekey1:ignorevalue1] got: map[Key1:AAA Key2:BBB Key3:CCC]
FAIL
FAIL	github.com/terraform-providers/terraform-provider-aws/aws	56.709s
FAIL
GNUmakefile:26: recipe for target 'testacc' failed
make: *** [testacc] Error 1
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSS3Bucket_ignoreTags'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSS3Bucket_ignoreTags -timeout 120m
=== RUN   TestAccAWSS3Bucket_ignoreTags
=== PAUSE TestAccAWSS3Bucket_ignoreTags
=== CONT  TestAccAWSS3Bucket_ignoreTags
--- FAIL: TestAccAWSS3Bucket_ignoreTags (57.64s)
    testing.go:669: Step 1 error: Check failed: Check 6/6 error: Incorrect tags, want: map[Key1:AAA Key2:BBB Key3:CCC ignorekey1:ignorevalue1] got: map[Key1:AAA Key2:BBB Key3:CCC]
FAIL
FAIL	github.com/terraform-providers/terraform-provider-aws/aws	57.677s
FAIL
GNUmakefile:26: recipe for target 'testacc' failed
make: *** [testacc] Error 1
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSS3Bucket_tagsWithSystemTags'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSS3Bucket_tagsWithSystemTags -timeout 120m
=== RUN   TestAccAWSS3Bucket_tagsWithSystemTags
=== PAUSE TestAccAWSS3Bucket_tagsWithSystemTags
=== CONT  TestAccAWSS3Bucket_tagsWithSystemTags
--- PASS: TestAccAWSS3Bucket_tagsWithSystemTags (176.60s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	176.645s

@ghost ghost added the provider Pertains to the provider itself, rather than any interaction with AWS. label Jul 19, 2020
@ewbankkit
Copy link
Contributor Author

Rebased to resolve merge conflict.
Re-ran relevant acceptance tests:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSS3Bucket_tags'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSS3Bucket_tags -timeout 120m
=== RUN   TestAccAWSS3Bucket_tagsWithNoSystemTags
=== PAUSE TestAccAWSS3Bucket_tagsWithNoSystemTags
=== RUN   TestAccAWSS3Bucket_tagsWithSystemTags
=== PAUSE TestAccAWSS3Bucket_tagsWithSystemTags
=== CONT  TestAccAWSS3Bucket_tagsWithNoSystemTags
=== CONT  TestAccAWSS3Bucket_tagsWithSystemTags
--- PASS: TestAccAWSS3Bucket_tagsWithNoSystemTags (94.24s)
--- PASS: TestAccAWSS3Bucket_tagsWithSystemTags (142.72s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	142.785s

@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Aug 21, 2020
@ewbankkit
Copy link
Contributor Author

ewbankkit commented Aug 21, 2020

Rebased to remove merge conflicts.
Re-ran acceptance tests:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSS3Bucket_tags'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSS3Bucket_tags -timeout 120m
=== RUN   TestAccAWSS3Bucket_tagsWithNoSystemTags
=== PAUSE TestAccAWSS3Bucket_tagsWithNoSystemTags
=== RUN   TestAccAWSS3Bucket_tagsWithSystemTags
=== PAUSE TestAccAWSS3Bucket_tagsWithSystemTags
=== CONT  TestAccAWSS3Bucket_tagsWithNoSystemTags
=== CONT  TestAccAWSS3Bucket_tagsWithSystemTags
--- PASS: TestAccAWSS3Bucket_tagsWithNoSystemTags (115.07s)
--- PASS: TestAccAWSS3Bucket_tagsWithSystemTags (161.66s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	161.716s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSS3Bucket_ignoreTags'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSS3Bucket_ignoreTags -timeout 120m
=== RUN   TestAccAWSS3Bucket_ignoreTags
=== PAUSE TestAccAWSS3Bucket_ignoreTags
=== CONT  TestAccAWSS3Bucket_ignoreTags
--- PASS: TestAccAWSS3Bucket_ignoreTags (51.52s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	51.555s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSS3BucketObject_ignoreTags'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSS3BucketObject_ignoreTags -timeout 120m
=== RUN   TestAccAWSS3BucketObject_ignoreTags
=== PAUSE TestAccAWSS3BucketObject_ignoreTags
=== CONT  TestAccAWSS3BucketObject_ignoreTags
--- PASS: TestAccAWSS3BucketObject_ignoreTags (51.68s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	51.730s

@ewbankkit
Copy link
Contributor Author

Rebased and resolved merge conflicts.
Re-ran relevant acceptance tests:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSS3Bucket_tags\|TestAccAWSS3Bucket_ignoreTags\|TestAccAWSS3BucketObject_ignoreTags'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSS3Bucket_tags\|TestAccAWSS3Bucket_ignoreTags\|TestAccAWSS3BucketObject_ignoreTags -timeout 120m
=== RUN   TestAccAWSS3BucketObject_ignoreTags
=== PAUSE TestAccAWSS3BucketObject_ignoreTags
=== RUN   TestAccAWSS3Bucket_tagsWithNoSystemTags
=== PAUSE TestAccAWSS3Bucket_tagsWithNoSystemTags
=== RUN   TestAccAWSS3Bucket_tagsWithSystemTags
=== PAUSE TestAccAWSS3Bucket_tagsWithSystemTags
=== RUN   TestAccAWSS3Bucket_ignoreTags
=== PAUSE TestAccAWSS3Bucket_ignoreTags
=== CONT  TestAccAWSS3BucketObject_ignoreTags
=== CONT  TestAccAWSS3Bucket_ignoreTags
=== CONT  TestAccAWSS3Bucket_tagsWithSystemTags
=== CONT  TestAccAWSS3Bucket_tagsWithNoSystemTags
2020/09/13 18:14:53 [WARN] Truncating attribute path of 0 diagnostics for TypeSet
--- PASS: TestAccAWSS3BucketObject_ignoreTags (59.29s)
--- PASS: TestAccAWSS3Bucket_ignoreTags (59.29s)
--- PASS: TestAccAWSS3Bucket_tagsWithNoSystemTags (119.79s)
--- PASS: TestAccAWSS3Bucket_tagsWithSystemTags (156.90s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	156.965s

@bflad bflad added the bug Addresses a defect in current functionality. label Oct 6, 2020
@bflad bflad added this to the v3.10.0 milestone Oct 6, 2020
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 🚀

Output from acceptance testing (test failure unrelated):

--- FAIL: TestAccAWSS3Bucket_UpdateGrant (99.49s)
--- PASS: TestAccAWSS3Bucket_acceleration (136.41s)
--- PASS: TestAccAWSS3Bucket_AclToGrant (121.55s)
--- PASS: TestAccAWSS3Bucket_basic (73.90s)
--- PASS: TestAccAWSS3Bucket_Bucket_EmptyString (75.26s)
--- PASS: TestAccAWSS3Bucket_Cors_Delete (67.67s)
--- PASS: TestAccAWSS3Bucket_Cors_EmptyOrigin (77.63s)
--- PASS: TestAccAWSS3Bucket_Cors_Update (133.80s)
--- PASS: TestAccAWSS3Bucket_disableDefaultEncryption_whenDefaultEncryptionIsEnabled (133.26s)
--- PASS: TestAccAWSS3Bucket_enableDefaultEncryption_whenAES256IsUsed (74.95s)
--- PASS: TestAccAWSS3Bucket_enableDefaultEncryption_whenTypical (75.65s)
--- PASS: TestAccAWSS3Bucket_forceDestroy (60.38s)
--- PASS: TestAccAWSS3Bucket_forceDestroyWithEmptyPrefixes (59.19s)
--- PASS: TestAccAWSS3Bucket_forceDestroyWithObjectLockEnabled (56.94s)
--- PASS: TestAccAWSS3Bucket_generatedName (74.19s)
--- PASS: TestAccAWSS3Bucket_GrantToAcl (126.42s)
--- PASS: TestAccAWSS3Bucket_ignoreTags (119.94s)
--- PASS: TestAccAWSS3Bucket_LifecycleBasic (148.63s)
--- PASS: TestAccAWSS3Bucket_LifecycleExpireMarkerOnly (122.51s)
--- PASS: TestAccAWSS3Bucket_LifecycleRule_Expiration_EmptyConfigurationBlock (69.45s)
--- PASS: TestAccAWSS3Bucket_Logging (80.49s)
--- PASS: TestAccAWSS3Bucket_namePrefix (73.64s)
--- PASS: TestAccAWSS3Bucket_objectLock (88.55s)
--- PASS: TestAccAWSS3Bucket_Policy (185.71s)
--- PASS: TestAccAWSS3Bucket_Replication (202.83s)
--- PASS: TestAccAWSS3Bucket_ReplicationConfiguration_Rule_Destination_AccessControlTranslation (153.18s)
--- PASS: TestAccAWSS3Bucket_ReplicationConfiguration_Rule_Destination_AddAccessControlTranslation (151.18s)
--- PASS: TestAccAWSS3Bucket_ReplicationExpectVersioningValidationError (55.63s)
--- PASS: TestAccAWSS3Bucket_ReplicationSchemaV2 (168.76s)
--- PASS: TestAccAWSS3Bucket_ReplicationWithoutPrefix (92.59s)
--- PASS: TestAccAWSS3Bucket_ReplicationWithoutStorageClass (117.59s)
--- PASS: TestAccAWSS3Bucket_RequestPayer (131.63s)
--- PASS: TestAccAWSS3Bucket_SameRegionReplicationSchemaV2 (70.60s)
--- PASS: TestAccAWSS3Bucket_shouldFailNotFound (50.35s)
--- PASS: TestAccAWSS3Bucket_tagsWithNoSystemTags (241.90s)
--- PASS: TestAccAWSS3Bucket_tagsWithSystemTags (283.92s)
--- PASS: TestAccAWSS3Bucket_UpdateAcl (129.68s)
--- PASS: TestAccAWSS3Bucket_Versioning (162.00s)
--- PASS: TestAccAWSS3Bucket_Website_Simple (184.12s)
--- PASS: TestAccAWSS3Bucket_WebsiteRedirect (182.52s)
--- PASS: TestAccAWSS3Bucket_WebsiteRoutingRules (129.42s)

--- PASS: TestAccAWSS3BucketObject_acl (177.09s)
--- PASS: TestAccAWSS3BucketObject_content (63.54s)
--- PASS: TestAccAWSS3BucketObject_contentBase64 (67.40s)
--- PASS: TestAccAWSS3BucketObject_empty (64.61s)
--- PASS: TestAccAWSS3BucketObject_etagEncryption (63.45s)
--- PASS: TestAccAWSS3BucketObject_ignoreTags (121.67s)
--- PASS: TestAccAWSS3BucketObject_kms (67.13s)
--- PASS: TestAccAWSS3BucketObject_metadata (167.79s)
--- PASS: TestAccAWSS3BucketObject_noNameNoKey (13.59s)
--- PASS: TestAccAWSS3BucketObject_NonVersioned (63.83s)
--- PASS: TestAccAWSS3BucketObject_ObjectLockLegalHoldStartWithNone (176.74s)
--- PASS: TestAccAWSS3BucketObject_ObjectLockLegalHoldStartWithOn (122.59s)
--- PASS: TestAccAWSS3BucketObject_ObjectLockRetentionStartWithNone (170.60s)
--- PASS: TestAccAWSS3BucketObject_ObjectLockRetentionStartWithSet (230.76s)
--- PASS: TestAccAWSS3BucketObject_source (60.64s)
--- PASS: TestAccAWSS3BucketObject_sse (65.88s)
--- PASS: TestAccAWSS3BucketObject_storageClass (286.04s)
--- PASS: TestAccAWSS3BucketObject_tags (225.84s)
--- PASS: TestAccAWSS3BucketObject_tagsLeadingSlash (230.76s)
--- PASS: TestAccAWSS3BucketObject_updates (118.53s)
--- PASS: TestAccAWSS3BucketObject_updateSameFile (117.90s)
--- PASS: TestAccAWSS3BucketObject_updatesWithVersioning (121.17s)
--- PASS: TestAccAWSS3BucketObject_updatesWithVersioningViaAccessPoint (121.99s)
--- PASS: TestAccAWSS3BucketObject_withContentCharacteristics (66.25s)

@bflad bflad merged commit 221c669 into hashicorp:master Oct 6, 2020
bflad added a commit that referenced this pull request Oct 6, 2020
@ewbankkit ewbankkit deleted the s3-keyvaluetags-ignored branch October 6, 2020 12:52
@ghost
Copy link

ghost commented Oct 9, 2020

This has been released in version 3.10.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Nov 5, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Nov 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. provider Pertains to the provider itself, rather than any interaction with AWS. service/s3 Issues and PRs that pertain to the s3 service. size/L Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants