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_access_point: Support S3 on Outposts #15616

Closed
bflad opened this issue Oct 13, 2020 · 3 comments · Fixed by #15621
Closed

resource/aws_s3_access_point: Support S3 on Outposts #15616

bflad opened this issue Oct 13, 2020 · 3 comments · Fixed by #15621
Assignees
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/s3control Issues and PRs that pertain to the s3control service.
Milestone

Comments

@bflad
Copy link
Contributor

bflad commented Oct 13, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue 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 issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

As part of the initial S3 on Outposts support for the Terraform AWS Provider, the existing aws_s3_access_point resource needs updates to support ARNs in the API calls or a new aws_s3control_access_point resource needs to be created.

Currently, the resource will throw this type of error since it cannot read the resource after creation:

aws_s3_access_point.example: Creating...

Error: Provider produced inconsistent result after apply

When applying changes to aws_s3_access_point.example, provider
"registry.terraform.io/hashicorp/aws" produced an unexpected new value: Root
resource was present, but now absent.

This is a bug in the provider, which should be reported in the provider's own
issue tracker.

The GetAccessPoint documentation notes:

    // For Amazon S3 on Outposts specify the ARN of the access point accessed in
    // the format arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/accesspoint/<my-accesspoint-name>.
    // For example, to access the access point reports-ap through outpost my-outpost
    // owned by account 123456789012 in Region us-west-2, use the URL encoding of
    // arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/accesspoint/reports-ap.
    // The value must be URL encoded.

Similar updates would be required for policy and deletion handling.

Affected Resource

  • aws_s3_access_point

Potential Terraform Configuration

resource "aws_s3_access_point" "example" {
  bucket = aws_s3control_bucket.example.arn
  name   = "example"

  vpc_configuration {
    vpc_id = aws_vpc.example.id
  }
}

References

@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. service/s3control Issues and PRs that pertain to the s3control service. labels Oct 13, 2020
@bflad bflad self-assigned this Oct 13, 2020
bflad added a commit that referenced this issue Oct 13, 2020
Reference: #15412
Reference: #15616

Output from acceptance testing:

```
--- SKIP: TestAccAWSS3AccessPoint_Bucket_Arn (2.35s)
--- PASS: TestAccAWSS3AccessPoint_bucketDisappears (25.12s)
--- PASS: TestAccAWSS3AccessPoint_disappears (30.49s)
--- PASS: TestAccAWSS3AccessPoint_VpcConfiguration (33.78s)
--- PASS: TestAccAWSS3AccessPoint_PublicAccessBlockConfiguration (34.38s)
--- PASS: TestAccAWSS3AccessPoint_basic (34.93s)
--- PASS: TestAccAWSS3AccessPoint_Policy (91.95s)
```
bflad added a commit that referenced this issue Oct 13, 2020
Reference: #15412
Reference: #15616

Output from acceptance testing:

```
--- SKIP: TestAccAWSS3AccessPoint_Bucket_Arn (2.35s)
--- PASS: TestAccAWSS3AccessPoint_bucketDisappears (25.12s)
--- PASS: TestAccAWSS3AccessPoint_disappears (30.49s)
--- PASS: TestAccAWSS3AccessPoint_VpcConfiguration (33.78s)
--- PASS: TestAccAWSS3AccessPoint_PublicAccessBlockConfiguration (34.38s)
--- PASS: TestAccAWSS3AccessPoint_basic (34.93s)
--- PASS: TestAccAWSS3AccessPoint_Policy (91.95s)
```
bflad added a commit that referenced this issue Oct 16, 2020
Reference: #15412
Reference: #15616

Output from acceptance testing:

```
--- SKIP: TestAccAWSS3AccessPoint_Bucket_Arn (2.35s)
--- PASS: TestAccAWSS3AccessPoint_bucketDisappears (25.12s)
--- PASS: TestAccAWSS3AccessPoint_disappears (30.49s)
--- PASS: TestAccAWSS3AccessPoint_VpcConfiguration (33.78s)
--- PASS: TestAccAWSS3AccessPoint_PublicAccessBlockConfiguration (34.38s)
--- PASS: TestAccAWSS3AccessPoint_basic (34.93s)
--- PASS: TestAccAWSS3AccessPoint_Policy (91.95s)
```
bflad added a commit that referenced this issue Oct 16, 2020
Reference: #15412
Reference: #15616

Output from acceptance testing:

```
--- SKIP: TestAccAWSS3AccessPoint_Bucket_Arn (2.35s)
--- PASS: TestAccAWSS3AccessPoint_bucketDisappears (25.12s)
--- PASS: TestAccAWSS3AccessPoint_disappears (30.49s)
--- PASS: TestAccAWSS3AccessPoint_VpcConfiguration (33.78s)
--- PASS: TestAccAWSS3AccessPoint_PublicAccessBlockConfiguration (34.38s)
--- PASS: TestAccAWSS3AccessPoint_basic (34.93s)
--- PASS: TestAccAWSS3AccessPoint_Policy (91.95s)
```
@bflad bflad added this to the v3.13.0 milestone Oct 27, 2020
bflad added a commit that referenced this issue Oct 27, 2020
* resource/aws_s3_access_point: Support S3 on Outposts

Reference: #15412
Reference: #15616

Output from acceptance testing:

```
--- SKIP: TestAccAWSS3AccessPoint_Bucket_Arn (2.35s)
--- PASS: TestAccAWSS3AccessPoint_bucketDisappears (25.12s)
--- PASS: TestAccAWSS3AccessPoint_disappears (30.49s)
--- PASS: TestAccAWSS3AccessPoint_VpcConfiguration (33.78s)
--- PASS: TestAccAWSS3AccessPoint_PublicAccessBlockConfiguration (34.38s)
--- PASS: TestAccAWSS3AccessPoint_basic (34.93s)
--- PASS: TestAccAWSS3AccessPoint_Policy (91.95s)
```

* resource/aws_s3_access_point: Handle bucket as ARN and skip GetAccessPointPolicyStatus API call with S3 on Outposts

Output from acceptance testing:

```
--- SKIP: TestAccAWSS3AccessPoint_Bucket_Arn (2.80s)
--- PASS: TestAccAWSS3AccessPoint_bucketDisappears (23.75s)
--- PASS: TestAccAWSS3AccessPoint_disappears (28.66s)
--- PASS: TestAccAWSS3AccessPoint_PublicAccessBlockConfiguration (32.91s)
--- PASS: TestAccAWSS3AccessPoint_VpcConfiguration (33.05s)
--- PASS: TestAccAWSS3AccessPoint_basic (33.64s)
--- PASS: TestAccAWSS3AccessPoint_Policy (89.22s)
```

* Update aws/resource_aws_s3_access_point_test.go

Co-authored-by: angie pinilla <[email protected]>

Co-authored-by: angie pinilla <[email protected]>
@bflad
Copy link
Contributor Author

bflad commented Oct 27, 2020

Support for this functionality has been merged and will release with version 3.13.0 of the Terraform AWS Provider, later this week. 👍

@ghost
Copy link

ghost commented Oct 29, 2020

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

@ghost
Copy link

ghost commented Nov 27, 2020

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 Nov 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/s3control Issues and PRs that pertain to the s3control service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant