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

r/s3_bucket: handle versioning configuration when explicitly disabled #22221

Merged
merged 4 commits into from
Dec 15, 2021

Conversation

anGie44
Copy link
Contributor

@anGie44 anGie44 commented Dec 15, 2021

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

Closes #4494

Output from acceptance testing:

--- PASS: TestAccS3Bucket_Basic_basic (92.94s)
--- PASS: TestAccS3Bucket_Manage_versioning (177.77s)
--- PASS: TestAccS3Bucket_Manage_versioningAndMfaDeleteDisabled (90.48s)
--- PASS: TestAccS3Bucket_Manage_versioningDisabled (93.08s)
--- PASS: TestAccS3Bucket_Manage_MfaDeleteDisabled (94.33s)

--- PASS: TestAccS3Bucket_Basic_acceleration (162.07s)
--- PASS: TestAccS3Bucket_Basic_emptyString (93.52s)
--- PASS: TestAccS3Bucket_Basic_forceDestroy (82.73s)
--- PASS: TestAccS3Bucket_Basic_forceDestroyWithEmptyPrefixes (78.55s)
--- PASS: TestAccS3Bucket_Basic_forceDestroyWithObjectLockEnabled (69.24s)
--- PASS: TestAccS3Bucket_Basic_generatedName (89.22s)
--- PASS: TestAccS3Bucket_Basic_keyEnabled (95.98s)
--- PASS: TestAccS3Bucket_Basic_namePrefix (89.23s)
--- PASS: TestAccS3Bucket_Basic_requestPayer (156.57s)
--- PASS: TestAccS3Bucket_Basic_shouldFailNotFound (70.36s)
--- PASS: TestAccS3Bucket_Manage_lifecycleBasic (208.52s)
--- PASS: TestAccS3Bucket_Manage_lifecycleExpireMarkerOnly (169.03s)
--- PASS: TestAccS3Bucket_Manage_lifecycleRuleAbortIncompleteMultipartUploadDaysNoExpiration (96.58s)
--- PASS: TestAccS3Bucket_Manage_lifecycleRuleExpirationEmptyBlock (82.26s)
--- PASS: TestAccS3Bucket_Manage_objectLock (115.14s)
--- PASS: TestAccS3Bucket_Replication_RTC_valid (198.83s)
--- PASS: TestAccS3Bucket_Replication_basic (257.21s)
--- PASS: TestAccS3Bucket_Replication_expectVersioningValidationError (70.96s)
--- PASS: TestAccS3Bucket_Replication_multipleDestinationsEmptyFilter (157.10s)
--- PASS: TestAccS3Bucket_Replication_multipleDestinationsNonEmptyFilter (155.38s)
--- PASS: TestAccS3Bucket_Replication_ruleDestinationAccessControlTranslation (174.02s)
--- PASS: TestAccS3Bucket_Replication_ruleDestinationAddAccessControlTranslation (171.97s)
--- PASS: TestAccS3Bucket_Replication_schemaV2 (235.06s)
--- PASS: TestAccS3Bucket_Replication_schemaV2SameRegion (99.31s)
--- PASS: TestAccS3Bucket_Replication_twoDestination (165.73s)
--- PASS: TestAccS3Bucket_Replication_withoutPrefix (131.80s)
--- PASS: TestAccS3Bucket_Replication_withoutStorageClass (136.67s)
--- PASS: TestAccS3Bucket_Security_aclToGrant (150.57s)
--- PASS: TestAccS3Bucket_Security_corsDelete (83.41s)
--- PASS: TestAccS3Bucket_Security_corsEmptyOrigin (97.97s)
--- PASS: TestAccS3Bucket_Security_corsUpdate (165.67s)
--- PASS: TestAccS3Bucket_Security_disableDefaultEncryptionWhenDefaultEncryptionIsEnabled (166.49s)
--- PASS: TestAccS3Bucket_Security_enableDefaultEncryptionWhenAES256IsUsed (92.44s)
--- PASS: TestAccS3Bucket_Security_enableDefaultEncryptionWhenTypical (92.69s)
--- PASS: TestAccS3Bucket_Security_grantToACL (148.74s)
--- PASS: TestAccS3Bucket_Security_logging (100.96s)
--- PASS: TestAccS3Bucket_Security_policy (222.65s)
--- PASS: TestAccS3Bucket_Security_updateACL (159.79s)
--- PASS: TestAccS3Bucket_Security_updateGrant (226.20s)
--- PASS: TestAccS3Bucket_Tags_basic (92.14s)
--- PASS: TestAccS3Bucket_Tags_ignoreTags (146.17s)
--- PASS: TestAccS3Bucket_Tags_withNoSystemTags (291.89s)
--- PASS: TestAccS3Bucket_Tags_withSystemTags (346.97s)
--- PASS: TestAccS3Bucket_Web_redirect (223.59s)
--- PASS: TestAccS3Bucket_Web_routingRules (159.33s)
--- PASS: TestAccS3Bucket_Web_simple (227.56s)

@github-actions github-actions bot added service/s3 Issues and PRs that pertain to the s3 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/L Managed by automation to categorize the size of a PR. labels Dec 15, 2021
@anGie44 anGie44 changed the title fix: handle versioning configuration when explicitly disabled r/s3_bucket: handle versioning configuration when explicitly disabled Dec 15, 2021
@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. and removed size/L Managed by automation to categorize the size of a PR. labels Dec 15, 2021
@anGie44 anGie44 marked this pull request as ready for review December 15, 2021 02:00
@anGie44 anGie44 added the bug Addresses a defect in current functionality. label Dec 15, 2021
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

% make testacc TESTS=TestAccS3Bucket_ PKG=s3 ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 2 -run='TestAccS3Bucket_' -timeout 180m
=== RUN   TestAccS3Bucket_Basic_basic
=== PAUSE TestAccS3Bucket_Basic_basic
=== RUN   TestAccS3Bucket_Basic_emptyString
=== PAUSE TestAccS3Bucket_Basic_emptyString
=== RUN   TestAccS3Bucket_Tags_withNoSystemTags
=== PAUSE TestAccS3Bucket_Tags_withNoSystemTags
=== RUN   TestAccS3Bucket_Tags_withSystemTags
=== PAUSE TestAccS3Bucket_Tags_withSystemTags
=== RUN   TestAccS3Bucket_Tags_ignoreTags
=== PAUSE TestAccS3Bucket_Tags_ignoreTags
=== RUN   TestAccS3Bucket_Tags_basic
=== PAUSE TestAccS3Bucket_Tags_basic
=== RUN   TestAccS3Bucket_Basic_namePrefix
=== PAUSE TestAccS3Bucket_Basic_namePrefix
=== RUN   TestAccS3Bucket_Basic_generatedName
=== PAUSE TestAccS3Bucket_Basic_generatedName
=== RUN   TestAccS3Bucket_Basic_acceleration
=== PAUSE TestAccS3Bucket_Basic_acceleration
=== RUN   TestAccS3Bucket_Basic_requestPayer
=== PAUSE TestAccS3Bucket_Basic_requestPayer
=== RUN   TestAccS3Bucket_Security_policy
=== PAUSE TestAccS3Bucket_Security_policy
=== RUN   TestAccS3Bucket_Security_updateACL
=== PAUSE TestAccS3Bucket_Security_updateACL
=== RUN   TestAccS3Bucket_Security_updateGrant
=== PAUSE TestAccS3Bucket_Security_updateGrant
=== RUN   TestAccS3Bucket_Security_aclToGrant
=== PAUSE TestAccS3Bucket_Security_aclToGrant
=== RUN   TestAccS3Bucket_Security_grantToACL
=== PAUSE TestAccS3Bucket_Security_grantToACL
=== RUN   TestAccS3Bucket_Web_simple
=== PAUSE TestAccS3Bucket_Web_simple
=== RUN   TestAccS3Bucket_Web_redirect
=== PAUSE TestAccS3Bucket_Web_redirect
=== RUN   TestAccS3Bucket_Web_routingRules
=== PAUSE TestAccS3Bucket_Web_routingRules
=== RUN   TestAccS3Bucket_Security_enableDefaultEncryptionWhenTypical
=== PAUSE TestAccS3Bucket_Security_enableDefaultEncryptionWhenTypical
=== RUN   TestAccS3Bucket_Security_enableDefaultEncryptionWhenAES256IsUsed
=== PAUSE TestAccS3Bucket_Security_enableDefaultEncryptionWhenAES256IsUsed
=== RUN   TestAccS3Bucket_Security_disableDefaultEncryptionWhenDefaultEncryptionIsEnabled
=== PAUSE TestAccS3Bucket_Security_disableDefaultEncryptionWhenDefaultEncryptionIsEnabled
=== RUN   TestAccS3Bucket_Basic_keyEnabled
=== PAUSE TestAccS3Bucket_Basic_keyEnabled
=== RUN   TestAccS3Bucket_Basic_shouldFailNotFound
=== PAUSE TestAccS3Bucket_Basic_shouldFailNotFound
=== RUN   TestAccS3Bucket_Manage_versioning
=== PAUSE TestAccS3Bucket_Manage_versioning
=== RUN   TestAccS3Bucket_Manage_versioningDisabled
=== PAUSE TestAccS3Bucket_Manage_versioningDisabled
=== RUN   TestAccS3Bucket_Manage_MfaDeleteDisabled
=== PAUSE TestAccS3Bucket_Manage_MfaDeleteDisabled
=== RUN   TestAccS3Bucket_Manage_versioningAndMfaDeleteDisabled
=== PAUSE TestAccS3Bucket_Manage_versioningAndMfaDeleteDisabled
=== RUN   TestAccS3Bucket_Security_corsUpdate
=== PAUSE TestAccS3Bucket_Security_corsUpdate
=== RUN   TestAccS3Bucket_Security_corsDelete
=== PAUSE TestAccS3Bucket_Security_corsDelete
=== RUN   TestAccS3Bucket_Security_corsEmptyOrigin
=== PAUSE TestAccS3Bucket_Security_corsEmptyOrigin
=== RUN   TestAccS3Bucket_Security_logging
=== PAUSE TestAccS3Bucket_Security_logging
=== RUN   TestAccS3Bucket_Manage_lifecycleBasic
=== PAUSE TestAccS3Bucket_Manage_lifecycleBasic
=== RUN   TestAccS3Bucket_Manage_lifecycleExpireMarkerOnly
=== PAUSE TestAccS3Bucket_Manage_lifecycleExpireMarkerOnly
=== RUN   TestAccS3Bucket_Manage_lifecycleRuleExpirationEmptyBlock
=== PAUSE TestAccS3Bucket_Manage_lifecycleRuleExpirationEmptyBlock
=== RUN   TestAccS3Bucket_Manage_lifecycleRuleAbortIncompleteMultipartUploadDaysNoExpiration
=== PAUSE TestAccS3Bucket_Manage_lifecycleRuleAbortIncompleteMultipartUploadDaysNoExpiration
=== RUN   TestAccS3Bucket_Replication_basic
=== PAUSE TestAccS3Bucket_Replication_basic
=== RUN   TestAccS3Bucket_Replication_multipleDestinationsEmptyFilter
=== PAUSE TestAccS3Bucket_Replication_multipleDestinationsEmptyFilter
=== RUN   TestAccS3Bucket_Replication_multipleDestinationsNonEmptyFilter
=== PAUSE TestAccS3Bucket_Replication_multipleDestinationsNonEmptyFilter
=== RUN   TestAccS3Bucket_Replication_twoDestination
=== PAUSE TestAccS3Bucket_Replication_twoDestination
=== RUN   TestAccS3Bucket_Replication_ruleDestinationAccessControlTranslation
=== PAUSE TestAccS3Bucket_Replication_ruleDestinationAccessControlTranslation
=== RUN   TestAccS3Bucket_Replication_ruleDestinationAddAccessControlTranslation
=== PAUSE TestAccS3Bucket_Replication_ruleDestinationAddAccessControlTranslation
=== RUN   TestAccS3Bucket_Replication_withoutStorageClass
=== PAUSE TestAccS3Bucket_Replication_withoutStorageClass
=== RUN   TestAccS3Bucket_Replication_expectVersioningValidationError
=== PAUSE TestAccS3Bucket_Replication_expectVersioningValidationError
=== RUN   TestAccS3Bucket_Replication_withoutPrefix
=== PAUSE TestAccS3Bucket_Replication_withoutPrefix
=== RUN   TestAccS3Bucket_Replication_schemaV2
=== PAUSE TestAccS3Bucket_Replication_schemaV2
=== RUN   TestAccS3Bucket_Replication_schemaV2SameRegion
=== PAUSE TestAccS3Bucket_Replication_schemaV2SameRegion
=== RUN   TestAccS3Bucket_Replication_RTC_valid
=== PAUSE TestAccS3Bucket_Replication_RTC_valid
=== RUN   TestAccS3Bucket_Manage_objectLock
=== PAUSE TestAccS3Bucket_Manage_objectLock
=== RUN   TestAccS3Bucket_Basic_forceDestroy
=== PAUSE TestAccS3Bucket_Basic_forceDestroy
=== RUN   TestAccS3Bucket_Basic_forceDestroyWithEmptyPrefixes
=== PAUSE TestAccS3Bucket_Basic_forceDestroyWithEmptyPrefixes
=== RUN   TestAccS3Bucket_Basic_forceDestroyWithObjectLockEnabled
=== PAUSE TestAccS3Bucket_Basic_forceDestroyWithObjectLockEnabled
=== CONT  TestAccS3Bucket_Basic_basic
=== CONT  TestAccS3Bucket_Manage_versioningAndMfaDeleteDisabled
--- PASS: TestAccS3Bucket_Basic_basic (33.41s)
=== CONT  TestAccS3Bucket_Replication_ruleDestinationAccessControlTranslation
--- PASS: TestAccS3Bucket_Manage_versioningAndMfaDeleteDisabled (36.77s)
=== CONT  TestAccS3Bucket_Basic_forceDestroyWithObjectLockEnabled
--- PASS: TestAccS3Bucket_Basic_forceDestroyWithObjectLockEnabled (31.99s)
=== CONT  TestAccS3Bucket_Basic_forceDestroyWithEmptyPrefixes
--- PASS: TestAccS3Bucket_Basic_forceDestroyWithEmptyPrefixes (25.86s)
=== CONT  TestAccS3Bucket_Basic_forceDestroy
--- PASS: TestAccS3Bucket_Replication_ruleDestinationAccessControlTranslation (69.58s)
=== CONT  TestAccS3Bucket_Manage_objectLock
--- PASS: TestAccS3Bucket_Basic_forceDestroy (27.83s)
=== CONT  TestAccS3Bucket_Replication_RTC_valid
--- PASS: TestAccS3Bucket_Manage_objectLock (58.02s)
=== CONT  TestAccS3Bucket_Replication_schemaV2SameRegion
--- PASS: TestAccS3Bucket_Replication_schemaV2SameRegion (49.51s)
=== CONT  TestAccS3Bucket_Replication_schemaV2
--- PASS: TestAccS3Bucket_Replication_RTC_valid (176.90s)
=== CONT  TestAccS3Bucket_Replication_withoutPrefix
--- PASS: TestAccS3Bucket_Replication_withoutPrefix (37.61s)
=== CONT  TestAccS3Bucket_Replication_expectVersioningValidationError
--- PASS: TestAccS3Bucket_Replication_expectVersioningValidationError (10.82s)
=== CONT  TestAccS3Bucket_Replication_withoutStorageClass
--- PASS: TestAccS3Bucket_Replication_schemaV2 (166.45s)
=== CONT  TestAccS3Bucket_Replication_ruleDestinationAddAccessControlTranslation
--- PASS: TestAccS3Bucket_Replication_withoutStorageClass (44.10s)
=== CONT  TestAccS3Bucket_Security_aclToGrant
--- PASS: TestAccS3Bucket_Security_aclToGrant (49.96s)
=== CONT  TestAccS3Bucket_Security_enableDefaultEncryptionWhenAES256IsUsed
--- PASS: TestAccS3Bucket_Replication_ruleDestinationAddAccessControlTranslation (71.46s)
=== CONT  TestAccS3Bucket_Security_enableDefaultEncryptionWhenTypical
--- PASS: TestAccS3Bucket_Security_enableDefaultEncryptionWhenAES256IsUsed (30.83s)
=== CONT  TestAccS3Bucket_Web_routingRules
--- PASS: TestAccS3Bucket_Security_enableDefaultEncryptionWhenTypical (37.06s)
=== CONT  TestAccS3Bucket_Web_redirect
--- PASS: TestAccS3Bucket_Web_routingRules (59.61s)
=== CONT  TestAccS3Bucket_Web_simple
--- PASS: TestAccS3Bucket_Web_redirect (82.59s)
=== CONT  TestAccS3Bucket_Security_grantToACL
--- PASS: TestAccS3Bucket_Web_simple (81.78s)
=== CONT  TestAccS3Bucket_Basic_generatedName
--- PASS: TestAccS3Bucket_Security_grantToACL (51.38s)
=== CONT  TestAccS3Bucket_Security_updateGrant
--- PASS: TestAccS3Bucket_Basic_generatedName (31.92s)
=== CONT  TestAccS3Bucket_Security_updateACL
--- PASS: TestAccS3Bucket_Security_updateGrant (87.98s)
=== CONT  TestAccS3Bucket_Security_policy
--- PASS: TestAccS3Bucket_Security_updateACL (64.06s)
=== CONT  TestAccS3Bucket_Basic_requestPayer
--- PASS: TestAccS3Bucket_Basic_requestPayer (58.45s)
=== CONT  TestAccS3Bucket_Basic_acceleration
--- PASS: TestAccS3Bucket_Security_policy (95.91s)
=== CONT  TestAccS3Bucket_Manage_versioning
--- PASS: TestAccS3Bucket_Basic_acceleration (59.15s)
=== CONT  TestAccS3Bucket_Manage_MfaDeleteDisabled
--- PASS: TestAccS3Bucket_Manage_MfaDeleteDisabled (30.30s)
=== CONT  TestAccS3Bucket_Manage_versioningDisabled
--- PASS: TestAccS3Bucket_Manage_versioning (64.55s)
=== CONT  TestAccS3Bucket_Tags_ignoreTags
--- PASS: TestAccS3Bucket_Manage_versioningDisabled (29.63s)
=== CONT  TestAccS3Bucket_Basic_namePrefix
--- PASS: TestAccS3Bucket_Basic_namePrefix (31.71s)
=== CONT  TestAccS3Bucket_Tags_basic
--- PASS: TestAccS3Bucket_Tags_ignoreTags (53.95s)
=== CONT  TestAccS3Bucket_Manage_lifecycleRuleExpirationEmptyBlock
--- PASS: TestAccS3Bucket_Manage_lifecycleRuleExpirationEmptyBlock (24.11s)
=== CONT  TestAccS3Bucket_Replication_twoDestination
--- PASS: TestAccS3Bucket_Tags_basic (38.79s)
=== CONT  TestAccS3Bucket_Replication_multipleDestinationsNonEmptyFilter
--- PASS: TestAccS3Bucket_Replication_twoDestination (41.47s)
=== CONT  TestAccS3Bucket_Replication_multipleDestinationsEmptyFilter
--- PASS: TestAccS3Bucket_Replication_multipleDestinationsNonEmptyFilter (39.73s)
=== CONT  TestAccS3Bucket_Replication_basic
--- PASS: TestAccS3Bucket_Replication_multipleDestinationsEmptyFilter (40.57s)
=== CONT  TestAccS3Bucket_Manage_lifecycleRuleAbortIncompleteMultipartUploadDaysNoExpiration
--- PASS: TestAccS3Bucket_Manage_lifecycleRuleAbortIncompleteMultipartUploadDaysNoExpiration (29.95s)
=== CONT  TestAccS3Bucket_Basic_shouldFailNotFound
--- PASS: TestAccS3Bucket_Basic_shouldFailNotFound (15.41s)
=== CONT  TestAccS3Bucket_Basic_keyEnabled
--- PASS: TestAccS3Bucket_Basic_keyEnabled (34.65s)
=== CONT  TestAccS3Bucket_Security_logging
--- PASS: TestAccS3Bucket_Replication_basic (126.21s)
=== CONT  TestAccS3Bucket_Manage_lifecycleExpireMarkerOnly
--- PASS: TestAccS3Bucket_Security_logging (42.57s)
=== CONT  TestAccS3Bucket_Manage_lifecycleBasic
--- PASS: TestAccS3Bucket_Manage_lifecycleExpireMarkerOnly (54.46s)
=== CONT  TestAccS3Bucket_Security_corsDelete
--- PASS: TestAccS3Bucket_Security_corsDelete (24.86s)
=== CONT  TestAccS3Bucket_Security_corsEmptyOrigin
--- PASS: TestAccS3Bucket_Manage_lifecycleBasic (79.50s)
=== CONT  TestAccS3Bucket_Tags_withNoSystemTags
--- PASS: TestAccS3Bucket_Security_corsEmptyOrigin (28.24s)
=== CONT  TestAccS3Bucket_Tags_withSystemTags
--- PASS: TestAccS3Bucket_Tags_withNoSystemTags (106.74s)
=== CONT  TestAccS3Bucket_Basic_emptyString
--- PASS: TestAccS3Bucket_Basic_emptyString (29.06s)
=== CONT  TestAccS3Bucket_Security_corsUpdate
--- PASS: TestAccS3Bucket_Tags_withSystemTags (153.69s)
=== CONT  TestAccS3Bucket_Security_disableDefaultEncryptionWhenDefaultEncryptionIsEnabled
--- PASS: TestAccS3Bucket_Security_corsUpdate (59.45s)
--- PASS: TestAccS3Bucket_Security_disableDefaultEncryptionWhenDefaultEncryptionIsEnabled (54.82s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	1444.269s

@anGie44 anGie44 added this to the v3.70.0 milestone Dec 15, 2021
@anGie44 anGie44 merged commit 08646c7 into main Dec 15, 2021
@anGie44 anGie44 deleted the b-s3-bucket-versioning branch December 15, 2021 16:37
github-actions bot pushed a commit that referenced this pull request Dec 15, 2021
@github-actions
Copy link

This functionality has been released in v3.70.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. Thank you!

@github-actions
Copy link

github-actions bot commented Jun 2, 2022

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 2, 2022
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. service/s3 Issues and PRs that pertain to the s3 service. size/XL 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.

S3 bucket versioning enabled when explicitly set to false
2 participants