-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Refactor S3 Bucket resource to use keyvaluetags package #11916
Conversation
Acceptance test output: $ make testacc TEST=./aws TESTARGS='-run=TestAccAWSS3Bucket_ReplicationSchemaV2' ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSS3Bucket_ReplicationSchemaV2 -timeout 120m === RUN TestAccAWSS3Bucket_ReplicationSchemaV2 === PAUSE TestAccAWSS3Bucket_ReplicationSchemaV2 === CONT TestAccAWSS3Bucket_ReplicationSchemaV2 --- PASS: TestAccAWSS3Bucket_ReplicationSchemaV2 (255.24s) PASS ok github.com/terraform-providers/terraform-provider-aws/aws 255.337s $ make testacc TEST=./aws TESTARGS='-run=TestAccAwsBackupPlan_withRecoveryPointTags' ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAwsBackupPlan_withRecoveryPointTags -timeout 120m === RUN TestAccAwsBackupPlan_withRecoveryPointTags === PAUSE TestAccAwsBackupPlan_withRecoveryPointTags === CONT TestAccAwsBackupPlan_withRecoveryPointTags --- PASS: TestAccAwsBackupPlan_withRecoveryPointTags (62.92s) PASS ok github.com/terraform-providers/terraform-provider-aws/aws 62.964s
b906c18
to
e475f6b
Compare
This reverts commit 5459f92.
5fb3aa7
to
b1c0ddd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
--- PASS: TestAccAWSS3Bucket_basic (22.58s)
--- PASS: TestAccAWSS3Bucket_Bucket_EmptyString (23.21s)
--- PASS: TestAccAWSS3Bucket_namePrefix (22.12s)
--- PASS: TestAccAWSS3Bucket_generatedName (22.05s)
--- PASS: TestAccAWSS3Bucket_shouldFailNotFound (17.55s)
--- PASS: TestAccAWSS3Bucket_RequestPayer (35.44s)
--- PASS: TestAccAWSS3Bucket_enableDefaultEncryption_whenAES256IsUsed (21.80s)
--- PASS: TestAccAWSS3Bucket_acceleration (39.56s)
--- PASS: TestAccAWSS3Bucket_UpdateAcl (35.52s)
--- PASS: TestAccAWSS3Bucket_Cors_Delete (20.65s)
--- PASS: TestAccAWSS3Bucket_region (53.84s)
--- PASS: TestAccAWSS3Bucket_Cors_EmptyOrigin (23.61s)
--- PASS: TestAccAWSS3Bucket_WebsiteRoutingRules (35.39s)
--- PASS: TestAccAWSS3Bucket_tagsWithNoSystemTags (61.37s)
--- PASS: TestAccAWSS3Bucket_Logging (23.69s)
--- PASS: TestAccAWSS3Bucket_disableDefaultEncryption_whenDefaultEncryptionIsEnabled (34.25s)
--- PASS: TestAccAWSS3Bucket_Policy (45.77s)
--- PASS: TestAccAWSS3Bucket_enableDefaultEncryption_whenTypical (40.39s)
--- PASS: TestAccAWSS3Bucket_Website_Simple (47.58s)
--- PASS: TestAccAWSS3Bucket_WebsiteRedirect (47.45s)
--- PASS: TestAccAWSS3Bucket_Cors_Update (36.20s)
--- PASS: TestAccAWSS3Bucket_forceDestroy (16.61s)
--- PASS: TestAccAWSS3Bucket_Versioning (43.86s)
--- PASS: TestAccAWSS3Bucket_forceDestroyWithEmptyPrefixes (16.67s)
--- PASS: TestAccAWSS3Bucket_forceDestroyWithObjectLockEnabled (16.04s)
--- PASS: TestAccAWSS3Bucket_objectLock (25.99s)
--- PASS: TestAccAWSS3Bucket_tagsWithSystemTags (95.23s)
--- PASS: TestAccAWSS3Bucket_ReplicationExpectVersioningValidationError (41.08s)
--- PASS: TestAccAWSS3Bucket_ReplicationWithoutStorageClass (63.91s)
--- PASS: TestAccAWSS3Bucket_ReplicationWithoutPrefix (62.34s)
--- PASS: TestAccAWSS3Bucket_ReplicationSchemaV2 (155.10s)
--- PASS: TestAccAWSS3Bucket_Replication (183.22s)
Test run includes some failures on the list of intermittent failures
This has been released in version 2.49.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! |
…s3 bucket The original retry was added in [1] but, in later refactor the retry was dropped [2] the causes failures like ``` level=error msg="Error: error updating S3 Bucket (terraform-20200316104552904700000001) tags: error listing resource tags (terraform-20200316104552904700000001): NoSuchBucket: The specified bucket does not exist" level=error msg="\tstatus code: 404, request id: <REDACTED>, host id: <REDACTED>" level=error level=error msg=" on ../tmp/openshift-install-019032273/bootstrap/main.tf line 7, in resource \"aws_s3_bucket\" \"ignition\":" level=error msg=" 7: resource \"aws_s3_bucket\" \"ignition\" {" level=error level=error ``` debug error: ``` time="2020-03-16T10:45:53Z" level=debug msg="2020-03-16T10:45:53.413Z [DEBUG] plugin.terraform-provider-aws: [DEBUG] [aws-sdk-go] DEBUG: Validate Response s3/GetBucketTagging failed, attempt 0/25, error NoSuchBucket: The specified bucket does not exist" time="2020-03-16T10:45:53Z" level=debug msg="2020-03-16T10:45:53.413Z [DEBUG] plugin.terraform-provider-aws: \tstatus code: 404, request id: <REDACTED>, host id: <REDACTED>" time="2020-03-16T10:45:53Z" level=debug msg="[DEBUG] module.bootstrap.aws_s3_bucket.ignition: apply errored, but we're indicating that via the Error pointer rather than returning it: error updating S3 Bucket (terraform-20200316104552904700000001) tags: error listing resource tags (terraform-20200316104552904700000001): NoSuchBucket: The specified bucket does not exist" ``` [1]: hashicorp#10863 [2]: hashicorp#11916
…ring resource creation (#12418) The original retry was added in [1] but, in later refactor the retry was dropped [2] the causes failures like ``` level=error msg="Error: error updating S3 Bucket (terraform-20200316104552904700000001) tags: error listing resource tags (terraform-20200316104552904700000001): NoSuchBucket: The specified bucket does not exist" level=error msg="\tstatus code: 404, request id: <REDACTED>, host id: <REDACTED>" level=error level=error msg=" on ../tmp/openshift-install-019032273/bootstrap/main.tf line 7, in resource \"aws_s3_bucket\" \"ignition\":" level=error msg=" 7: resource \"aws_s3_bucket\" \"ignition\" {" level=error level=error ``` debug error: ``` time="2020-03-16T10:45:53Z" level=debug msg="2020-03-16T10:45:53.413Z [DEBUG] plugin.terraform-provider-aws: [DEBUG] [aws-sdk-go] DEBUG: Validate Response s3/GetBucketTagging failed, attempt 0/25, error NoSuchBucket: The specified bucket does not exist" time="2020-03-16T10:45:53Z" level=debug msg="2020-03-16T10:45:53.413Z [DEBUG] plugin.terraform-provider-aws: \tstatus code: 404, request id: <REDACTED>, host id: <REDACTED>" time="2020-03-16T10:45:53Z" level=debug msg="[DEBUG] module.bootstrap.aws_s3_bucket.ignition: apply errored, but we're indicating that via the Error pointer rather than returning it: error updating S3 Bucket (terraform-20200316104552904700000001) tags: error listing resource tags (terraform-20200316104552904700000001): NoSuchBucket: The specified bucket does not exist" ``` [1]: #10863 [2]: #11916 Output from acceptance testing (failures unrelated): ``` --- FAIL: TestAccAWSS3Bucket_acceleration (10.31s) --- FAIL: TestAccAWSS3Bucket_LifecycleBasic (22.92s) --- PASS: TestAccAWSS3Bucket_AclToGrant (24.74s) --- PASS: TestAccAWSS3Bucket_basic (15.90s) --- PASS: TestAccAWSS3Bucket_Bucket_EmptyString (15.78s) --- PASS: TestAccAWSS3Bucket_Cors_Delete (13.81s) --- PASS: TestAccAWSS3Bucket_Cors_EmptyOrigin (15.40s) --- PASS: TestAccAWSS3Bucket_Cors_Update (25.35s) --- PASS: TestAccAWSS3Bucket_disableDefaultEncryption_whenDefaultEncryptionIsEnabled (25.34s) --- PASS: TestAccAWSS3Bucket_enableDefaultEncryption_whenAES256IsUsed (16.30s) --- PASS: TestAccAWSS3Bucket_enableDefaultEncryption_whenTypical (34.44s) --- PASS: TestAccAWSS3Bucket_forceDestroy (11.94s) --- PASS: TestAccAWSS3Bucket_forceDestroyWithEmptyPrefixes (11.09s) --- PASS: TestAccAWSS3Bucket_forceDestroyWithObjectLockEnabled (12.85s) --- PASS: TestAccAWSS3Bucket_generatedName (16.61s) --- PASS: TestAccAWSS3Bucket_GrantToAcl (25.53s) --- PASS: TestAccAWSS3Bucket_LifecycleExpireMarkerOnly (21.66s) --- PASS: TestAccAWSS3Bucket_Logging (18.80s) --- PASS: TestAccAWSS3Bucket_namePrefix (15.44s) --- PASS: TestAccAWSS3Bucket_objectLock (19.55s) --- PASS: TestAccAWSS3Bucket_Policy (35.15s) --- PASS: TestAccAWSS3Bucket_region (14.15s) --- PASS: TestAccAWSS3Bucket_Replication (130.64s) --- PASS: TestAccAWSS3Bucket_ReplicationConfiguration_Rule_Destination_AccessControlTranslation (87.14s) --- PASS: TestAccAWSS3Bucket_ReplicationExpectVersioningValidationError (26.74s) --- PASS: TestAccAWSS3Bucket_ReplicationSchemaV2 (108.61s) --- PASS: TestAccAWSS3Bucket_ReplicationWithoutPrefix (40.18s) --- PASS: TestAccAWSS3Bucket_ReplicationWithoutStorageClass (41.80s) --- PASS: TestAccAWSS3Bucket_RequestPayer (26.72s) --- PASS: TestAccAWSS3Bucket_shouldFailNotFound (10.49s) --- PASS: TestAccAWSS3Bucket_tagsWithNoSystemTags (45.69s) --- PASS: TestAccAWSS3Bucket_tagsWithSystemTags (80.96s) --- PASS: TestAccAWSS3Bucket_UpdateAcl (23.42s) --- PASS: TestAccAWSS3Bucket_UpdateGrant (34.79s) --- PASS: TestAccAWSS3Bucket_Versioning (31.30s) --- PASS: TestAccAWSS3Bucket_Website_Simple (32.40s) --- PASS: TestAccAWSS3Bucket_WebsiteRedirect (32.73s) --- PASS: TestAccAWSS3Bucket_WebsiteRoutingRules (25.14s) --- PASS: TestAccAWSS3MultiBucket_withTags (17.79s) ```
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! |
Community Note
Relates #10688.
Release note for CHANGELOG:
Output from acceptance testing: