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

Add s3_bucket_object deprecated copies #22877

Merged
merged 11 commits into from
Feb 2, 2022
Merged

Conversation

YakDriver
Copy link
Member

@YakDriver YakDriver commented Feb 1, 2022

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 #15458
Relates #22776
Relates #22850

Output from acceptance testing:

% make testacc TESTS=TestAccS3BucketObject_ PKG=s3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 20 -run='TestAccS3BucketObject_'  -timeout 180m
--- SKIP: TestAccS3BucketObject_nonVersioned (0.98s)
--- PASS: TestAccS3BucketObject_noNameNoKey (5.46s)
--- PASS: TestAccS3BucketObject_contentBase64 (46.22s)
--- PASS: TestAccS3BucketObject_withContentCharacteristics (49.20s)
--- PASS: TestAccS3BucketObject_objectBucketKeyEnabled (44.55s)
--- PASS: TestAccS3BucketObject_bucketBucketKeyEnabled (52.36s)
--- PASS: TestAccS3BucketObject_sse (52.81s)
--- PASS: TestAccS3BucketObject_etagEncryption (52.95s)
--- PASS: TestAccS3BucketObject_kms (53.37s)
--- PASS: TestAccS3BucketObject_objectLockLegalHoldStartWithOn (89.84s)
--- PASS: TestAccS3BucketObject_updatesWithVersioningViaAccessPoint (91.95s)
--- PASS: TestAccS3BucketObject_sourceHashTrigger (92.78s)
--- PASS: TestAccS3BucketObject_defaultBucketSSE (47.43s)
--- PASS: TestAccS3BucketObject_ignoreTags (92.98s)
--- PASS: TestAccS3BucketObject_updatesWithVersioning (94.11s)
--- PASS: TestAccS3BucketObject_source (43.70s)
--- PASS: TestAccS3BucketObject_content (44.42s)
--- PASS: TestAccS3BucketObject_empty (44.32s)
--- PASS: TestAccS3BucketObject_updateSameFile (71.72s)
--- PASS: TestAccS3BucketObject_objectLockLegalHoldStartWithNone (122.23s)
--- PASS: TestAccS3BucketObject_metadata (122.57s)
--- PASS: TestAccS3BucketObject_updates (70.70s)
--- PASS: TestAccS3BucketObject_acl (124.39s)
--- PASS: TestAccS3BucketObject_tagsLeadingMultipleSlashes (147.53s)
--- PASS: TestAccS3BucketObject_tagsMultipleSlashes (147.88s)
--- PASS: TestAccS3BucketObject_tags (150.50s)
--- PASS: TestAccS3BucketObject_tagsLeadingSingleSlash (150.53s)
--- PASS: TestAccS3BucketObject_objectLockRetentionStartWithSet (122.56s)
--- PASS: TestAccS3BucketObject_storageClass (172.58s)
--- PASS: TestAccS3BucketObject_objectLockRetentionStartWithNone (83.83s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	175.829s
% make testacc TESTS=TestAccS3BucketObjectDataSource PKG=s3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 20 -run='TestAccS3BucketObjectDataSource'  -timeout 180m
--- PASS: TestAccS3BucketObjectDataSource_singleSlashAsKey (33.06s)
--- PASS: TestAccS3BucketObjectDataSource_basic (35.43s)
--- PASS: TestAccS3BucketObjectDataSource_basicViaAccessPoint (37.84s)
--- PASS: TestAccS3BucketObjectDataSource_allParams (38.44s)
--- PASS: TestAccS3BucketObjectDataSource_objectLockLegalHoldOff (38.55s)
--- PASS: TestAccS3BucketObjectDataSource_readableBody (38.65s)
--- PASS: TestAccS3BucketObjectDataSource_bucketKeyEnabled (38.82s)
--- PASS: TestAccS3BucketObjectDataSource_kmsEncrypted (38.84s)
--- PASS: TestAccS3BucketObjectDataSource_objectLockLegalHoldOn (39.70s)
--- PASS: TestAccS3BucketObjectDataSource_multipleSlashes (58.52s)
--- PASS: TestAccS3BucketObjectDataSource_leadingSlash (58.63s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	60.353s
% make testacc TESTS=TestAccS3BucketObjectsDataSource PKG=s3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 20 -run='TestAccS3BucketObjectsDataSource'  -timeout 180m
--- PASS: TestAccS3BucketObjectsDataSource_prefixes (57.27s)
--- PASS: TestAccS3BucketObjectsDataSource_all (57.53s)
--- PASS: TestAccS3BucketObjectsDataSource_fetchOwner (57.66s)
--- PASS: TestAccS3BucketObjectsDataSource_encoded (57.66s)
--- PASS: TestAccS3BucketObjectsDataSource_basicViaAccessPoint (57.74s)
--- PASS: TestAccS3BucketObjectsDataSource_startAfter (57.78s)
--- PASS: TestAccS3BucketObjectsDataSource_maxKeys (57.78s)
--- PASS: TestAccS3BucketObjectsDataSource_basic (57.81s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	59.477s

@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. provider Pertains to the provider itself, rather than any interaction with AWS. service/s3 Issues and PRs that pertain to the s3 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. documentation Introduces or discusses updates to documentation. labels Feb 1, 2022
@YakDriver
Copy link
Member Author

Both sets of tests together:

% make testacc TESTS='TestAccS3BucketObject_|TestAccS3Object' PKG=s3 
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 20 -run='TestAccS3BucketObject_|TestAccS3Object'  -timeout 180m
--- SKIP: TestAccS3Object_nonVersioned (0.94s)
--- PASS: TestAccS3BucketObject_noNameNoKey (4.97s)
--- PASS: TestAccS3Object_withContentCharacteristics (32.87s)
--- PASS: TestAccS3Object_contentBase64 (44.89s)
--- PASS: TestAccS3Object_objectBucketKeyEnabled (45.48s)
--- PASS: TestAccS3Object_kms (51.98s)
--- PASS: TestAccS3Object_sse (51.98s)
--- PASS: TestAccS3Object_etagEncryption (52.01s)
--- PASS: TestAccS3ObjectsDataSource_maxKeys (76.72s)
--- PASS: TestAccS3ObjectsDataSource_basicViaAccessPoint (71.75s)
--- PASS: TestAccS3ObjectsDataSource_encoded (76.72s)
--- PASS: TestAccS3ObjectsDataSource_startAfter (76.73s)
--- PASS: TestAccS3ObjectsDataSource_all (75.80s)
--- PASS: TestAccS3ObjectsDataSource_prefixes (76.73s)
--- PASS: TestAccS3ObjectsDataSource_fetchOwner (76.75s)
--- PASS: TestAccS3ObjectDataSource_leadingSlash (82.17s)
--- PASS: TestAccS3Object_ignoreTags (83.91s)
--- PASS: TestAccS3Object_defaultBucketSSE (44.01s)
--- PASS: TestAccS3Object_sourceHashTrigger (88.91s)
--- PASS: TestAccS3Object_empty (40.71s)
--- PASS: TestAccS3Object_bucketBucketKeyEnabled (43.70s)
--- PASS: TestAccS3ObjectsDataSource_basic (68.91s)
--- PASS: TestAccS3Object_metadata (111.55s)
--- PASS: TestAccS3ObjectDataSource_objectLockLegalHoldOn (42.64s)
--- PASS: TestAccS3Object_content (43.08s)
--- PASS: TestAccS3Object_source (43.12s)
--- PASS: TestAccS3Object_acl (125.96s)
--- PASS: TestAccS3Object_updatesWithVersioning (80.56s)
--- PASS: TestAccS3ObjectCopy_basic (38.26s)
--- PASS: TestAccS3ObjectDataSource_objectLockLegalHoldOff (44.44s)
--- PASS: TestAccS3Object_updatesWithVersioningViaAccessPoint (77.44s)
--- PASS: TestAccS3BucketObject_defaultBucketSSE (38.62s)
--- PASS: TestAccS3Object_tags (148.63s)
--- PASS: TestAccS3BucketObject_objectBucketKeyEnabled (32.20s)
--- PASS: TestAccS3Object_noNameNoKey (2.23s)
--- PASS: TestAccS3ObjectDataSource_allParams (43.71s)
--- PASS: TestAccS3BucketObject_bucketBucketKeyEnabled (38.61s)
--- PASS: TestAccS3BucketObject_ignoreTags (69.19s)
--- PASS: TestAccS3ObjectDataSource_kmsEncrypted (35.62s)
--- PASS: TestAccS3ObjectDataSource_bucketKeyEnabled (37.68s)
--- PASS: TestAccS3Object_storageClass (166.58s)
--- PASS: TestAccS3Object_objectLockRetentionStartWithNone (95.92s)
--- PASS: TestAccS3BucketObject_bucketObjectBucket (84.46s)
--- PASS: TestAccS3ObjectDataSource_basic (33.47s)
--- PASS: TestAccS3Object_objectLockLegalHoldStartWithOn (62.72s)
--- PASS: TestAccS3ObjectDataSource_readableBody (34.52s)
--- PASS: TestAccS3BucketObject_updateSameFile (57.83s)
--- PASS: TestAccS3Object_objectLockLegalHoldStartWithNone (99.98s)
--- PASS: TestAccS3BucketObject_tagsMultipleSlashes (117.08s)
--- PASS: TestAccS3ObjectDataSource_singleSlashAsKey (31.34s)
--- SKIP: TestAccS3BucketObject_nonVersioned (0.00s)
--- PASS: TestAccS3BucketObject_contentBase64 (34.40s)
--- PASS: TestAccS3BucketObject_withContentCharacteristics (34.23s)
--- PASS: TestAccS3Object_tagsMultipleSlashes (125.77s)
--- PASS: TestAccS3Object_tagsLeadingMultipleSlashes (126.09s)
--- PASS: TestAccS3ObjectDataSource_basicViaAccessPoint (38.42s)
--- PASS: TestAccS3Object_objectLockRetentionStartWithSet (124.23s)
--- PASS: TestAccS3BucketObject_objectLockLegalHoldStartWithOn (62.87s)
--- PASS: TestAccS3BucketObject_kms (38.18s)
--- PASS: TestAccS3BucketObject_sse (32.41s)
--- PASS: TestAccS3Object_updateSameFile (57.63s)
--- PASS: TestAccS3BucketObject_sourceHashTrigger (60.50s)
--- PASS: TestAccS3ObjectDataSource_multipleSlashes (60.16s)
--- PASS: TestAccS3BucketObject_source (30.96s)
--- PASS: TestAccS3ObjectCopy_BucketKeyEnabled_bucket (34.59s)
--- PASS: TestAccS3BucketObject_objectLockRetentionStartWithSet (114.24s)
--- PASS: TestAccS3BucketObject_objectLockRetentionStartWithNone (88.72s)
--- PASS: TestAccS3BucketObject_objectLockLegalHoldStartWithNone (88.81s)
--- PASS: TestAccS3Object_tagsLeadingSingleSlash (120.96s)
--- PASS: TestAccS3BucketObject_etagEncryption (31.07s)
--- PASS: TestAccS3BucketObject_empty (31.59s)
--- PASS: TestAccS3BucketObject_updates (57.43s)
--- PASS: TestAccS3BucketObject_updatesWithVersioning (58.10s)
--- PASS: TestAccS3BucketObject_content (28.80s)
--- PASS: TestAccS3ObjectCopy_BucketKeyEnabled_object (29.88s)
--- PASS: TestAccS3BucketObject_acl (88.27s)
--- PASS: TestAccS3BucketObject_metadata (77.95s)
--- PASS: TestAccS3BucketObject_updatesWithVersioningViaAccessPoint (57.59s)
--- PASS: TestAccS3Object_updates (52.59s)
--- PASS: TestAccS3BucketObject_tagsLeadingSingleSlash (107.41s)
--- PASS: TestAccS3BucketObject_tags (103.03s)
--- PASS: TestAccS3BucketObject_tagsLeadingMultipleSlashes (100.16s)
--- PASS: TestAccS3BucketObject_storageClass (122.17s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	317.397s

@ewbankkit ewbankkit added this to the v4.0.0 milestone Feb 2, 2022
@ewbankkit
Copy link
Contributor

ewbankkit commented Feb 2, 2022

I think we need some CHANGELOG entries for this and the new resource/data sources added in #22850, plus something in the Upgrade Guide: #22818.

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 TESTARGS='-run=TestAccS3BucketObject_\|TestAccS3BucketObjectDataSource_TestAccS3BucketObjectsDataSource_' PKG=s3 ACCTEST_PARALLELISM=5
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 5  -run=TestAccS3BucketObject_\|TestAccS3BucketObjectDataSource_TestAccS3BucketObjectsDataSource_ -timeout 180m
=== RUN   TestAccS3BucketObject_noNameNoKey
=== PAUSE TestAccS3BucketObject_noNameNoKey
=== RUN   TestAccS3BucketObject_empty
=== PAUSE TestAccS3BucketObject_empty
=== RUN   TestAccS3BucketObject_source
=== PAUSE TestAccS3BucketObject_source
=== RUN   TestAccS3BucketObject_content
=== PAUSE TestAccS3BucketObject_content
=== RUN   TestAccS3BucketObject_etagEncryption
=== PAUSE TestAccS3BucketObject_etagEncryption
=== RUN   TestAccS3BucketObject_contentBase64
=== PAUSE TestAccS3BucketObject_contentBase64
=== RUN   TestAccS3BucketObject_sourceHashTrigger
=== PAUSE TestAccS3BucketObject_sourceHashTrigger
=== RUN   TestAccS3BucketObject_withContentCharacteristics
=== PAUSE TestAccS3BucketObject_withContentCharacteristics
=== RUN   TestAccS3BucketObject_nonVersioned
=== PAUSE TestAccS3BucketObject_nonVersioned
=== RUN   TestAccS3BucketObject_updates
=== PAUSE TestAccS3BucketObject_updates
=== RUN   TestAccS3BucketObject_updateSameFile
=== PAUSE TestAccS3BucketObject_updateSameFile
=== RUN   TestAccS3BucketObject_updatesWithVersioning
=== PAUSE TestAccS3BucketObject_updatesWithVersioning
=== RUN   TestAccS3BucketObject_updatesWithVersioningViaAccessPoint
=== PAUSE TestAccS3BucketObject_updatesWithVersioningViaAccessPoint
=== RUN   TestAccS3BucketObject_kms
=== PAUSE TestAccS3BucketObject_kms
=== RUN   TestAccS3BucketObject_sse
=== PAUSE TestAccS3BucketObject_sse
=== RUN   TestAccS3BucketObject_acl
=== PAUSE TestAccS3BucketObject_acl
=== RUN   TestAccS3BucketObject_metadata
=== PAUSE TestAccS3BucketObject_metadata
=== RUN   TestAccS3BucketObject_storageClass
=== PAUSE TestAccS3BucketObject_storageClass
=== RUN   TestAccS3BucketObject_tags
=== PAUSE TestAccS3BucketObject_tags
=== RUN   TestAccS3BucketObject_tagsLeadingSingleSlash
=== PAUSE TestAccS3BucketObject_tagsLeadingSingleSlash
=== RUN   TestAccS3BucketObject_tagsLeadingMultipleSlashes
=== PAUSE TestAccS3BucketObject_tagsLeadingMultipleSlashes
=== RUN   TestAccS3BucketObject_tagsMultipleSlashes
=== PAUSE TestAccS3BucketObject_tagsMultipleSlashes
=== RUN   TestAccS3BucketObject_objectLockLegalHoldStartWithNone
=== PAUSE TestAccS3BucketObject_objectLockLegalHoldStartWithNone
=== RUN   TestAccS3BucketObject_objectLockLegalHoldStartWithOn
=== PAUSE TestAccS3BucketObject_objectLockLegalHoldStartWithOn
=== RUN   TestAccS3BucketObject_objectLockRetentionStartWithNone
=== PAUSE TestAccS3BucketObject_objectLockRetentionStartWithNone
=== RUN   TestAccS3BucketObject_objectLockRetentionStartWithSet
=== PAUSE TestAccS3BucketObject_objectLockRetentionStartWithSet
=== RUN   TestAccS3BucketObject_objectBucketKeyEnabled
=== PAUSE TestAccS3BucketObject_objectBucketKeyEnabled
=== RUN   TestAccS3BucketObject_bucketBucketKeyEnabled
=== PAUSE TestAccS3BucketObject_bucketBucketKeyEnabled
=== RUN   TestAccS3BucketObject_defaultBucketSSE
=== PAUSE TestAccS3BucketObject_defaultBucketSSE
=== RUN   TestAccS3BucketObject_ignoreTags
=== PAUSE TestAccS3BucketObject_ignoreTags
=== RUN   TestAccS3BucketObject_bucketObjectBucket
=== PAUSE TestAccS3BucketObject_bucketObjectBucket
=== CONT  TestAccS3BucketObject_noNameNoKey
=== CONT  TestAccS3BucketObject_metadata
=== CONT  TestAccS3BucketObject_nonVersioned
=== CONT  TestAccS3BucketObject_acl
=== CONT  TestAccS3BucketObject_sse
=== CONT  TestAccS3BucketObject_nonVersioned
    acctest.go:1143: skipping test; environment variable TF_ACC_ASSUME_ROLE_ARN must be set. Usage: Amazon Resource Name (ARN) of existing IAM Role to assume for testing restricted permissions
--- SKIP: TestAccS3BucketObject_nonVersioned (0.89s)
=== CONT  TestAccS3BucketObject_kms
--- PASS: TestAccS3BucketObject_noNameNoKey (2.64s)
=== CONT  TestAccS3BucketObject_updateSameFile
--- PASS: TestAccS3BucketObject_sse (31.21s)
=== CONT  TestAccS3BucketObject_updates
--- PASS: TestAccS3BucketObject_kms (31.85s)
=== CONT  TestAccS3BucketObject_etagEncryption
--- PASS: TestAccS3BucketObject_updateSameFile (49.42s)
=== CONT  TestAccS3BucketObject_withContentCharacteristics
--- PASS: TestAccS3BucketObject_etagEncryption (28.85s)
=== CONT  TestAccS3BucketObject_sourceHashTrigger
--- PASS: TestAccS3BucketObject_metadata (75.34s)
=== CONT  TestAccS3BucketObject_updatesWithVersioning
=== CONT  TestAccS3BucketObject_updatesWithVersioningViaAccessPoint
--- PASS: TestAccS3BucketObject_withContentCharacteristics (24.57s)
--- PASS: TestAccS3BucketObject_acl (78.83s)
=== CONT  TestAccS3BucketObject_objectLockRetentionStartWithNone
--- PASS: TestAccS3BucketObject_updates (50.39s)
=== CONT  TestAccS3BucketObject_bucketObjectBucket
--- PASS: TestAccS3BucketObject_sourceHashTrigger (49.83s)
=== CONT  TestAccS3BucketObject_ignoreTags
--- PASS: TestAccS3BucketObject_updatesWithVersioning (52.28s)
=== CONT  TestAccS3BucketObject_defaultBucketSSE
--- PASS: TestAccS3BucketObject_updatesWithVersioningViaAccessPoint (54.70s)
=== CONT  TestAccS3BucketObject_bucketBucketKeyEnabled
--- PASS: TestAccS3BucketObject_bucketObjectBucket (62.93s)
=== CONT  TestAccS3BucketObject_objectBucketKeyEnabled
--- PASS: TestAccS3BucketObject_objectLockRetentionStartWithNone (72.02s)
=== CONT  TestAccS3BucketObject_source
--- PASS: TestAccS3BucketObject_defaultBucketSSE (29.81s)
=== CONT  TestAccS3BucketObject_content
--- PASS: TestAccS3BucketObject_bucketBucketKeyEnabled (30.38s)
=== CONT  TestAccS3BucketObject_tagsLeadingMultipleSlashes
--- PASS: TestAccS3BucketObject_ignoreTags (51.09s)
=== CONT  TestAccS3BucketObject_objectLockLegalHoldStartWithOn
--- PASS: TestAccS3BucketObject_objectBucketKeyEnabled (26.17s)
=== CONT  TestAccS3BucketObject_objectLockLegalHoldStartWithNone
--- PASS: TestAccS3BucketObject_source (28.28s)
=== CONT  TestAccS3BucketObject_objectLockRetentionStartWithSet
--- PASS: TestAccS3BucketObject_content (28.88s)
=== CONT  TestAccS3BucketObject_tagsMultipleSlashes
--- PASS: TestAccS3BucketObject_objectLockLegalHoldStartWithOn (52.51s)
=== CONT  TestAccS3BucketObject_tags
--- PASS: TestAccS3BucketObject_objectLockLegalHoldStartWithNone (74.16s)
=== CONT  TestAccS3BucketObject_tagsLeadingSingleSlash
--- PASS: TestAccS3BucketObject_tagsLeadingMultipleSlashes (98.58s)
=== CONT  TestAccS3BucketObject_storageClass
--- PASS: TestAccS3BucketObject_objectLockRetentionStartWithSet (93.13s)
=== CONT  TestAccS3BucketObject_empty
--- PASS: TestAccS3BucketObject_tagsMultipleSlashes (95.80s)
=== CONT  TestAccS3BucketObject_contentBase64
--- PASS: TestAccS3BucketObject_empty (28.53s)
--- PASS: TestAccS3BucketObject_contentBase64 (26.89s)
--- PASS: TestAccS3BucketObject_tags (97.37s)
--- PASS: TestAccS3BucketObject_tagsLeadingSingleSlash (97.68s)
--- PASS: TestAccS3BucketObject_storageClass (120.06s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	383.974s

@YakDriver YakDriver merged commit 3f30734 into main Feb 2, 2022
@YakDriver YakDriver deleted the f-add-s3-bucket-object-depro branch February 2, 2022 21:12
github-actions bot pushed a commit that referenced this pull request Feb 2, 2022
@github-actions
Copy link

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

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 21, 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. provider Pertains to the provider itself, rather than any interaction with AWS. 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.

2 participants