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

resource/aws_s3_bucket: Add top-level object_lock_enabled parameter #23556

Merged
merged 5 commits into from
Mar 9, 2022

Conversation

gdavison
Copy link
Contributor

@gdavison gdavison commented Mar 7, 2022

Adds top-level object_lock_enabled parameter to aws_s3_bucket and deprecates object_lock_configuration.object_lock_enabled.

Closes #23549

Output from acceptance testing:

$ make testacc PKG=s3 TESTS='TestAccS3Bucket_|TestAccS3BucketObject_|TestAccS3BucketObjectDataSource_|TestAccS3Object_|TestAccS3ObjectDataSource_'

--- PASS: TestAccS3Bucket_Basic_shouldFailNotFound (170.67s)
--- PASS: TestAccS3BucketObjectDataSource_basic (188.71s)
--- PASS: TestAccS3Object_objectBucketKeyEnabled (190.64s)
--- PASS: TestAccS3Object_defaultBucketSSE (196.46s)
--- PASS: TestAccS3Object_bucketBucketKeyEnabled (198.22s)
--- SKIP: TestAccS3Object_nonVersioned (0.00s)
--- PASS: TestAccS3Object_sse (244.58s)
--- PASS: TestAccS3BucketObject_sse (254.45s)
--- PASS: TestAccS3Object_kms (255.85s)
--- PASS: TestAccS3Object_ignoreTags (337.50s)
--- PASS: TestAccS3Object_objectLockLegalHoldStartWithOn (351.01s)
--- PASS: TestAccS3ObjectDataSource_allParams (197.22s)
--- PASS: TestAccS3ObjectDataSource_bucketKeyEnabled (196.90s)
--- PASS: TestAccS3ObjectDataSource_kmsEncrypted (194.07s)
--- PASS: TestAccS3ObjectDataSource_readableBody (195.66s)
--- PASS: TestAccS3Object_objectLockRetentionStartWithNone (506.35s)
--- PASS: TestAccS3Object_objectLockLegalHoldStartWithNone (506.70s)
--- PASS: TestAccS3Object_updatesWithVersioningViaAccessPoint (351.02s)
--- PASS: TestAccS3Object_metadata (534.27s)
--- PASS: TestAccS3ObjectDataSource_basicViaAccessPoint (200.78s)
--- PASS: TestAccS3Object_updateSameFile (348.66s)
--- PASS: TestAccS3Object_acl (548.57s)
--- PASS: TestAccS3ObjectDataSource_basic (198.60s)
--- PASS: TestAccS3Object_updatesWithVersioning (410.63s)
--- PASS: TestAccS3Bucket_Basic_forceDestroyWithObjectLockEnabled (206.34s)
--- PASS: TestAccS3Object_updates (408.33s)
--- PASS: TestAccS3Object_noNameNoKey (83.07s)
--- PASS: TestAccS3Object_tagsMultipleSlashes (636.75s)
--- PASS: TestAccS3Bucket_Basic_forceDestroyWithEmptyPrefixes (197.20s)
--- PASS: TestAccS3Object_tagsLeadingMultipleSlashes (645.02s)
--- PASS: TestAccS3Bucket_Basic_forceDestroy (197.56s)
--- PASS: TestAccS3Object_objectLockRetentionStartWithSet (656.26s)
--- PASS: TestAccS3Bucket_Manage_objectLockWithVersioning_deprecatedEnabled (252.12s)
--- PASS: TestAccS3Object_tags (707.15s)
--- PASS: TestAccS3Object_tagsLeadingSingleSlash (712.03s)
--- PASS: TestAccS3ObjectDataSource_objectLockLegalHoldOff (195.70s)
--- PASS: TestAccS3Object_withContentCharacteristics (189.98s)
--- PASS: TestAccS3Bucket_Manage_objectLock_deprecatedEnabled (244.88s)
--- PASS: TestAccS3Bucket_Manage_objectLockWithVersioning (247.76s)
--- PASS: TestAccS3Bucket_Manage_objectLock (243.50s)
--- PASS: TestAccS3Object_empty (243.10s)
--- PASS: TestAccS3Object_contentBase64 (180.41s)
--- PASS: TestAccS3ObjectDataSource_singleSlashAsKey (178.18s)
--- PASS: TestAccS3Object_source (240.37s)
--- PASS: TestAccS3ObjectDataSource_objectLockLegalHoldOn (182.78s)
--- PASS: TestAccS3BucketObject_objectBucketKeyEnabled (179.10s)
--- PASS: TestAccS3Object_storageClass (828.13s)
--- PASS: TestAccS3Bucket_Basic_generatedName (230.63s)
--- SKIP: TestAccS3BucketObject_nonVersioned (0.00s)
--- PASS: TestAccS3Object_etagEncryption (229.89s)
--- PASS: TestAccS3Bucket_Basic_namePrefix (224.72s)
--- PASS: TestAccS3Object_content (225.57s)
--- PASS: TestAccS3ObjectDataSource_multipleSlashes (310.51s)
--- PASS: TestAccS3Bucket_Tags_basic (228.77s)
--- PASS: TestAccS3ObjectDataSource_leadingSlash (310.81s)
--- PASS: TestAccS3BucketObject_source (225.66s)
--- PASS: TestAccS3Object_sourceHashTrigger (362.09s)
--- PASS: TestAccS3BucketObject_kms (225.10s)
--- PASS: TestAccS3Bucket_Basic_emptyString (225.31s)
--- PASS: TestAccS3BucketObject_noNameNoKey (67.40s)
--- PASS: TestAccS3Bucket_Basic_basic (223.41s)
--- PASS: TestAccS3BucketObject_defaultBucketSSE (171.37s)
--- PASS: TestAccS3BucketObject_withContentCharacteristics (170.21s)
--- PASS: TestAccS3BucketObject_updatesWithVersioningViaAccessPoint (311.70s)
--- PASS: TestAccS3Bucket_Tags_ignoreTags (306.17s)
--- PASS: TestAccS3BucketObject_updateSameFile (311.23s)
--- PASS: TestAccS3BucketObjectDataSource_objectLockLegalHoldOn (178.09s)
--- PASS: TestAccS3BucketObject_contentBase64 (172.33s)
--- PASS: TestAccS3BucketObject_updatesWithVersioning (362.27s)
--- PASS: TestAccS3BucketObjectDataSource_singleSlashAsKey (173.43s)
--- PASS: TestAccS3BucketObject_ignoreTags (316.13s)
--- PASS: TestAccS3BucketObject_empty (223.10s)
--- PASS: TestAccS3BucketObject_etagEncryption (224.69s)
--- PASS: TestAccS3BucketObject_updates (364.70s)
--- PASS: TestAccS3BucketObject_content (227.55s)
--- PASS: TestAccS3BucketObject_bucketBucketKeyEnabled (176.07s)
--- PASS: TestAccS3BucketObject_sourceHashTrigger (354.41s)
--- PASS: TestAccS3BucketObjectDataSource_multipleSlashes (301.93s)
--- PASS: TestAccS3BucketObjectDataSource_leadingSlash (302.85s)
--- PASS: TestAccS3BucketObjectDataSource_bucketKeyEnabled (171.22s)
--- PASS: TestAccS3BucketObjectDataSource_readableBody (168.23s)
--- PASS: TestAccS3BucketObjectDataSource_objectLockLegalHoldOff (171.02s)
--- PASS: TestAccS3BucketObjectDataSource_kmsEncrypted (159.25s)
--- PASS: TestAccS3Bucket_Tags_withNoSystemTags (607.39s)
--- PASS: TestAccS3BucketObject_objectLockLegalHoldStartWithOn (289.81s)
--- PASS: TestAccS3Bucket_Tags_withSystemTags (643.39s)
--- PASS: TestAccS3BucketObjectDataSource_basicViaAccessPoint (138.39s)
--- PASS: TestAccS3BucketObjectDataSource_allParams (133.47s)
--- PASS: TestAccS3BucketObject_objectLockRetentionStartWithNone (383.18s)
--- PASS: TestAccS3BucketObject_metadata (411.04s)
--- PASS: TestAccS3BucketObject_tagsLeadingMultipleSlashes (457.52s)
--- PASS: TestAccS3BucketObject_acl (361.93s)
--- PASS: TestAccS3BucketObject_objectLockLegalHoldStartWithNone (318.26s)
--- PASS: TestAccS3BucketObject_objectLockRetentionStartWithSet (447.38s)
--- PASS: TestAccS3BucketObject_tagsMultipleSlashes (396.65s)
--- PASS: TestAccS3BucketObject_tagsLeadingSingleSlash (431.82s)
--- PASS: TestAccS3BucketObject_tags (420.48s)
--- PASS: TestAccS3BucketObject_storageClass (447.42s)

@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. 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 Mar 7, 2022
@anGie44 anGie44 self-assigned this Mar 9, 2022
Copy link
Contributor

@anGie44 anGie44 left a comment

Choose a reason for hiding this comment

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

Edit: I forgot the aws_s3_bucket_object_lock_configuration documentation will also need to be updated as the example uses the now-deprecated form, otherwise LGTM 🚀

@anGie44 anGie44 added the enhancement Requests to existing resources that expand the functionality or scope. label Mar 9, 2022
@gdavison
Copy link
Contributor Author

gdavison commented Mar 9, 2022

Good catch on the documentation

@gdavison gdavison merged commit 0f62939 into main Mar 9, 2022
@gdavison gdavison deleted the s3bucket-object-lock branch March 9, 2022 19:59
@github-actions github-actions bot added this to the v4.5.0 milestone Mar 9, 2022
github-actions bot pushed a commit that referenced this pull request Mar 9, 2022
@github-actions
Copy link

This functionality has been released in v4.5.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!

minamijoyo added a commit to minamijoyo/tfedit that referenced this pull request Apr 7, 2022
Starting from AWS provider v4.5.0, an `object_lock_configuration` block
in the `aws_s3_bucket` resource is now deprecated and an
`object_lock_enabled` attribute inside the `object_lock_configuration`
block was moved to a top-level.
hashicorp/terraform-provider-aws#23556
@github-actions
Copy link

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 May 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. 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.

resource/aws_s3_bucket: Add top-level object_lock_enabled parameter
2 participants