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_object_copy: Add bucket_key_enabled argument #18611

Merged
merged 2 commits into from
Apr 8, 2021

Conversation

bflad
Copy link
Member

@bflad bflad commented Apr 7, 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 #18609

Previously:

=== CONT  TestAccAWSS3ObjectCopy_basic
------- Stderr: -------
panic: Invalid address to set: []string{"bucket_key_enabled"}
goroutine 841 [running]:
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ResourceData).Set(0xc002d7ad80, 0x7c7e098, 0x12, 0x0, 0x0, 0x0, 0x203000)
  /opt/teamcity-agent/work/2e10e023da0c7520/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.5.0/helper/schema/resource_data.go:230 +0x371
github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsS3BucketObjectRead(0xc002d7ad80, 0x6eb6fc0, 0xc002138000, 0x65e60a0, 0xc003a5ff50)
  /opt/teamcity-agent/work/2e10e023da0c7520/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_object.go:360 +0x394
github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsS3ObjectCopyDoCopy(0xc002d7ad80, 0x6eb6fc0, 0xc002138000, 0xc003a52360, 0xc003a2a300)
  /opt/teamcity-agent/work/2e10e023da0c7520/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_object_copy.go:615 +0x11a5
github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsS3ObjectCopyCreate(0xc002d7ad80, 0x6eb6fc0, 0xc002138000, 0x2, 0xffffffffffffffff)
  /opt/teamcity-agent/work/2e10e023da0c7520/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_object_copy.go:283 +0x3f
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0xc00166f420, 0x8c35088, 0xc003a1af80, 0xc002d7ad80, 0x6eb6fc0, 0xc002138000, 0x0, 0x0, 0x0)
  /opt/teamcity-agent/work/2e10e023da0c7520/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.5.0/helper/schema/resource.go:318 +0x1ee

Output from acceptance testing in AWS Commercial:

--- PASS: TestAccAWSS3ObjectCopy_basic (27.04s)
--- PASS: TestAccAWSS3ObjectCopy_BucketKeyEnabled_Object (28.07s)
--- PASS: TestAccAWSS3ObjectCopy_BucketKeyEnabled_Bucket (31.09s)

Output from acceptance testing in AWS GovCloud (US):

--- PASS: TestAccAWSS3ObjectCopy_basic (28.17s)
--- PASS: TestAccAWSS3ObjectCopy_BucketKeyEnabled_Object (28.79s)
--- PASS: TestAccAWSS3ObjectCopy_BucketKeyEnabled_Bucket (31.41s)

Reference: #18609

Previously:

```
=== CONT  TestAccAWSS3ObjectCopy_basic
------- Stderr: -------
panic: Invalid address to set: []string{"bucket_key_enabled"}
goroutine 841 [running]:
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ResourceData).Set(0xc002d7ad80, 0x7c7e098, 0x12, 0x0, 0x0, 0x0, 0x203000)
  /opt/teamcity-agent/work/2e10e023da0c7520/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.5.0/helper/schema/resource_data.go:230 +0x371
github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsS3BucketObjectRead(0xc002d7ad80, 0x6eb6fc0, 0xc002138000, 0x65e60a0, 0xc003a5ff50)
  /opt/teamcity-agent/work/2e10e023da0c7520/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_object.go:360 +0x394
github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsS3ObjectCopyDoCopy(0xc002d7ad80, 0x6eb6fc0, 0xc002138000, 0xc003a52360, 0xc003a2a300)
  /opt/teamcity-agent/work/2e10e023da0c7520/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_object_copy.go:615 +0x11a5
github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsS3ObjectCopyCreate(0xc002d7ad80, 0x6eb6fc0, 0xc002138000, 0x2, 0xffffffffffffffff)
  /opt/teamcity-agent/work/2e10e023da0c7520/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_object_copy.go:283 +0x3f
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0xc00166f420, 0x8c35088, 0xc003a1af80, 0xc002d7ad80, 0x6eb6fc0, 0xc002138000, 0x0, 0x0, 0x0)
  /opt/teamcity-agent/work/2e10e023da0c7520/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.5.0/helper/schema/resource.go:318 +0x1ee
```

Output from acceptance testing in AWS Commercial:

```
--- PASS: TestAccAWSS3ObjectCopy_basic (27.04s)
--- PASS: TestAccAWSS3ObjectCopy_BucketKeyEnabled_Object (28.07s)
--- PASS: TestAccAWSS3ObjectCopy_BucketKeyEnabled_Bucket (31.09s)
```

Output from acceptance testing in AWS GovCloud (US):

```
--- PASS: TestAccAWSS3ObjectCopy_basic (28.17s)
--- PASS: TestAccAWSS3ObjectCopy_BucketKeyEnabled_Object (28.79s)
--- PASS: TestAccAWSS3ObjectCopy_BucketKeyEnabled_Bucket (31.41s)
```
@bflad bflad requested a review from a team as a code owner April 7, 2021 14:30
@ghost ghost added size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Apr 7, 2021
bflad added a commit that referenced this pull request Apr 7, 2021
@bflad bflad added the service/s3 Issues and PRs that pertain to the s3 service. label Apr 7, 2021
@YakDriver YakDriver self-assigned this Apr 8, 2021
Copy link
Member

@YakDriver YakDriver left a comment

Choose a reason for hiding this comment

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

Looks great! 🎉

Acceptance tests on commercial:

--- PASS: TestAccAWSS3ObjectCopy_basic (24.91s)
--- PASS: TestAccAWSS3ObjectCopy_BucketKeyEnabled_Object (25.81s)
--- PASS: TestAccAWSS3ObjectCopy_BucketKeyEnabled_Bucket (28.45s)

Acceptance tests on GovCloud:

--- PASS: TestAccAWSS3ObjectCopy_basic (28.05s)
--- PASS: TestAccAWSS3ObjectCopy_BucketKeyEnabled_Object (28.57s)
--- PASS: TestAccAWSS3ObjectCopy_BucketKeyEnabled_Bucket (30.81s)

@bflad bflad merged commit 314cccf into main Apr 8, 2021
@bflad bflad deleted the b-aws_s3_object_copy-bucket_key_enabled branch April 8, 2021 23:20
@github-actions github-actions bot added this to the v3.36.0 milestone Apr 8, 2021
github-actions bot pushed a commit that referenced this pull request Apr 8, 2021
@ghost
Copy link

ghost commented Apr 9, 2021

This has been released in version 3.36.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!

bflad added a commit that referenced this pull request Apr 9, 2021
@ghost
Copy link

ghost commented May 9, 2021

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!

@ghost ghost locked as resolved and limited conversation to collaborators May 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/s3 Issues and PRs that pertain to the s3 service. size/M 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_object_copy: bucket_key_enabled Attribute Crash
2 participants