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/aws_s3_object_copy: Migrate to AWS SDK for Go v2 #33330

Merged
merged 26 commits into from
Sep 6, 2023

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Sep 6, 2023

Description

Migrates the aws_s3_object_copy resource to AWS SDK for Go v2.
The resource Delete functionality has not yet been migrated as it's shared with others.

Relations

Relates #33304.

Output from Acceptance Testing

% make testacc TESTARGS='-run=TestAccS3ObjectCopy_' PKG=s3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 20  -run=TestAccS3ObjectCopy_ -timeout 180m
=== RUN   TestAccS3ObjectCopy_basic
=== PAUSE TestAccS3ObjectCopy_basic
=== RUN   TestAccS3ObjectCopy_disappears
=== PAUSE TestAccS3ObjectCopy_disappears
=== RUN   TestAccS3ObjectCopy_tags
=== PAUSE TestAccS3ObjectCopy_tags
=== RUN   TestAccS3ObjectCopy_metadata
=== PAUSE TestAccS3ObjectCopy_metadata
=== RUN   TestAccS3ObjectCopy_grant
=== PAUSE TestAccS3ObjectCopy_grant
=== RUN   TestAccS3ObjectCopy_BucketKeyEnabled_bucket
=== PAUSE TestAccS3ObjectCopy_BucketKeyEnabled_bucket
=== RUN   TestAccS3ObjectCopy_BucketKeyEnabled_object
=== PAUSE TestAccS3ObjectCopy_BucketKeyEnabled_object
=== RUN   TestAccS3ObjectCopy_sourceWithSlashes
=== PAUSE TestAccS3ObjectCopy_sourceWithSlashes
=== CONT  TestAccS3ObjectCopy_basic
=== CONT  TestAccS3ObjectCopy_grant
=== CONT  TestAccS3ObjectCopy_tags
=== CONT  TestAccS3ObjectCopy_metadata
=== CONT  TestAccS3ObjectCopy_BucketKeyEnabled_bucket
=== CONT  TestAccS3ObjectCopy_BucketKeyEnabled_object
=== CONT  TestAccS3ObjectCopy_disappears
=== CONT  TestAccS3ObjectCopy_sourceWithSlashes
--- PASS: TestAccS3ObjectCopy_metadata (60.51s)
--- PASS: TestAccS3ObjectCopy_basic (61.31s)
--- PASS: TestAccS3ObjectCopy_BucketKeyEnabled_bucket (61.71s)
--- PASS: TestAccS3ObjectCopy_disappears (62.18s)
--- PASS: TestAccS3ObjectCopy_BucketKeyEnabled_object (62.51s)
--- PASS: TestAccS3ObjectCopy_grant (63.21s)
--- PASS: TestAccS3ObjectCopy_sourceWithSlashes (80.20s)
--- PASS: TestAccS3ObjectCopy_tags (104.52s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	110.315s

% make testacc TESTARGS='-run=TestAccS3ObjectCopy_basic' 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=TestAccS3ObjectCopy_basic -timeout 180m
=== RUN   TestAccS3ObjectCopy_basic
=== PAUSE TestAccS3ObjectCopy_basic
=== CONT  TestAccS3ObjectCopy_basic
--- PASS: TestAccS3ObjectCopy_basic (42.01s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	48.447s
% make testacc TESTARGS='-run=TestAccS3ObjectCopy_disappears' 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=TestAccS3ObjectCopy_disappears -timeout 180m
=== RUN   TestAccS3ObjectCopy_disappears
=== PAUSE TestAccS3ObjectCopy_disappears
=== CONT  TestAccS3ObjectCopy_disappears
--- PASS: TestAccS3ObjectCopy_disappears (43.24s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	48.855s
% make testacc TESTARGS='-run=TestAccS3ObjectCopy_tags' 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=TestAccS3ObjectCopy_tags -timeout 180m
=== RUN   TestAccS3ObjectCopy_tags
=== PAUSE TestAccS3ObjectCopy_tags
=== CONT  TestAccS3ObjectCopy_tags
--- PASS: TestAccS3ObjectCopy_tags (68.37s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	73.887s
% make testacc TESTARGS='-run=TestAccS3ObjectCopy_metadata' 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=TestAccS3ObjectCopy_metadata -timeout 180m
=== RUN   TestAccS3ObjectCopy_metadata
=== PAUSE TestAccS3ObjectCopy_metadata
=== CONT  TestAccS3ObjectCopy_metadata
--- PASS: TestAccS3ObjectCopy_metadata (74.15s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	95.276s
% make testacc TESTARGS='-run=TestAccS3ObjectCopy_grant' 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=TestAccS3ObjectCopy_grant -timeout 180m
=== RUN   TestAccS3ObjectCopy_grant
=== PAUSE TestAccS3ObjectCopy_grant
=== CONT  TestAccS3ObjectCopy_grant
--- PASS: TestAccS3ObjectCopy_grant (26.52s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	31.858s
% make testacc TESTARGS='-run=TestAccS3ObjectCopy_BucketKeyEnabled_' 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=TestAccS3ObjectCopy_BucketKeyEnabled_ -timeout 180m
=== RUN   TestAccS3ObjectCopy_BucketKeyEnabled_bucket
=== PAUSE TestAccS3ObjectCopy_BucketKeyEnabled_bucket
=== RUN   TestAccS3ObjectCopy_BucketKeyEnabled_object
=== PAUSE TestAccS3ObjectCopy_BucketKeyEnabled_object
=== CONT  TestAccS3ObjectCopy_BucketKeyEnabled_bucket
=== CONT  TestAccS3ObjectCopy_BucketKeyEnabled_object
--- PASS: TestAccS3ObjectCopy_BucketKeyEnabled_object (27.50s)
--- PASS: TestAccS3ObjectCopy_BucketKeyEnabled_bucket (27.67s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	33.161s
% make testacc TESTARGS='-run=TestAccS3ObjectCopy_sourceAndTargetWithSlashes' 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=TestAccS3ObjectCopy_sourceAndTargetWithSlashes -timeout 180m
=== RUN   TestAccS3ObjectCopy_sourceAndTargetWithSlashes
=== PAUSE TestAccS3ObjectCopy_sourceAndTargetWithSlashes
=== CONT  TestAccS3ObjectCopy_sourceAndTargetWithSlashes
--- PASS: TestAccS3ObjectCopy_sourceAndTargetWithSlashes (25.79s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	31.058s
% make testacc TESTARGS='-run=TestAccS3ObjectCopy_sourceWithSlashes' PKG=s3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 20  -run=TestAccS3ObjectCopy_sourceWithSlashes -timeout 180m
=== RUN   TestAccS3ObjectCopy_sourceWithSlashes
=== PAUSE TestAccS3ObjectCopy_sourceWithSlashes
=== CONT  TestAccS3ObjectCopy_sourceWithSlashes
--- PASS: TestAccS3ObjectCopy_sourceWithSlashes (44.62s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	50.263s
@github-actions
Copy link

github-actions bot commented Sep 6, 2023

Community Note

Voting for Prioritization

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

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/s3 Issues and PRs that pertain to the s3 service. generators Relates to code generators. labels Sep 6, 2023
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Sep 6, 2023
Copy link
Member

@jar-b jar-b 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=TestAccS3ObjectCopy_' PKG=s3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 20  -run=TestAccS3ObjectCopy_ -timeout 180m
=== RUN   TestAccS3ObjectCopy_basic
=== PAUSE TestAccS3ObjectCopy_basic
=== RUN   TestAccS3ObjectCopy_disappears
=== PAUSE TestAccS3ObjectCopy_disappears
=== RUN   TestAccS3ObjectCopy_tags
=== PAUSE TestAccS3ObjectCopy_tags
=== RUN   TestAccS3ObjectCopy_metadata
=== PAUSE TestAccS3ObjectCopy_metadata
=== RUN   TestAccS3ObjectCopy_grant
=== PAUSE TestAccS3ObjectCopy_grant
=== RUN   TestAccS3ObjectCopy_BucketKeyEnabled_bucket
=== PAUSE TestAccS3ObjectCopy_BucketKeyEnabled_bucket
=== RUN   TestAccS3ObjectCopy_BucketKeyEnabled_object
=== PAUSE TestAccS3ObjectCopy_BucketKeyEnabled_object
=== RUN   TestAccS3ObjectCopy_sourceWithSlashes
=== PAUSE TestAccS3ObjectCopy_sourceWithSlashes
=== CONT  TestAccS3ObjectCopy_basic
=== CONT  TestAccS3ObjectCopy_grant
=== CONT  TestAccS3ObjectCopy_tags
=== CONT  TestAccS3ObjectCopy_disappears
=== CONT  TestAccS3ObjectCopy_metadata
=== CONT  TestAccS3ObjectCopy_BucketKeyEnabled_object
=== CONT  TestAccS3ObjectCopy_sourceWithSlashes
=== CONT  TestAccS3ObjectCopy_BucketKeyEnabled_bucket
--- PASS: TestAccS3ObjectCopy_basic (180.07s)
--- PASS: TestAccS3ObjectCopy_metadata (180.25s)
--- PASS: TestAccS3ObjectCopy_disappears (186.06s)
--- PASS: TestAccS3ObjectCopy_sourceWithSlashes (186.69s)
--- PASS: TestAccS3ObjectCopy_BucketKeyEnabled_object (204.12s)
--- PASS: TestAccS3ObjectCopy_grant (216.52s)
--- PASS: TestAccS3ObjectCopy_BucketKeyEnabled_bucket (217.88s)
--- PASS: TestAccS3ObjectCopy_tags (331.03s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/s3 334.299s

@ewbankkit ewbankkit merged commit 93cc3b0 into main Sep 6, 2023
33 checks passed
@ewbankkit ewbankkit deleted the f-aws_s3_object-aws-sdk-v2 branch September 6, 2023 20:11
@github-actions github-actions bot added this to the v5.16.0 milestone Sep 6, 2023
@ewbankkit ewbankkit changed the title r/aws_s3_object_copy: Migrate to AWS SDK for Go v2. r/aws_s3_object_copy: Migrate to AWS SDK for Go v2 Sep 7, 2023
@github-actions
Copy link

github-actions bot commented Sep 8, 2023

This functionality has been released in v5.16.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 Oct 8, 2023

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 Oct 8, 2023
@justinretzolk justinretzolk added the aws-sdk-go-migration Issues that are related to the providers migration to AWS SDK for Go v2. label Mar 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
aws-sdk-go-migration Issues that are related to the providers migration to AWS SDK for Go v2. generators Relates to code generators. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. 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.

3 participants