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

Feature Request: S3 on Outposts Support #15412

Closed
bflad opened this issue Oct 1, 2020 · 2 comments
Closed

Feature Request: S3 on Outposts Support #15412

bflad opened this issue Oct 1, 2020 · 2 comments
Assignees
Labels
new-data-source Introduces a new data source. new-resource Introduces a new resource. service/datasync Issues and PRs that pertain to the datasync service. service/ec2 Issues and PRs that pertain to the ec2 service. service/outposts Issues and PRs that pertain to the outposts service. service/s3control Issues and PRs that pertain to the s3control service. service/s3outposts Issues and PRs that pertain to the s3outposts service. service/s3 Issues and PRs that pertain to the s3 service.

Comments

@bflad
Copy link
Contributor

bflad commented Oct 1, 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

Today, AWS has announced Amazon S3 on Outposts support.

Amazon S3 on Outposts delivers object storage to your on-premises AWS Outposts environment to meet local data processing and data residency needs. Using the S3 APIs and features, S3 on Outposts makes it easy to store, secure, tag, retrieve, report on, and control access to the data on your Outpost. AWS Outposts is a fully managed service that extends AWS infrastructure, services, and tools to virtually any data center, co-location space, or on-premises facility for a truly consistent hybrid experience.

HashiCorp has been working with the S3 and DataSync service teams to investigate adding near-term support for this functionality. This issue is a meta-tracking issue for potential individual features, which will be broken out into separate issues. Once the initial scope is defined, this tracking issue will be closed in preference of the individual feature requests.

Features and Enhancements

Example End-to-End Terraform Configuration

# This example is for illustrative purposes to show parts of a real-world use case.

# Outposts Configuration

data "aws_outposts_outpost" "example" {
  # ... configuration ...
}

resource "aws_vpc" "outpost" {
  cidr_block = "10.0.0.0/16"
}

resource "aws_security_group" "outpost" {
  vpc_id = aws_vpc.outpost.id
}

resource "aws_subnet" "outpost" {
  availability_zone = data.aws_outposts_outpost.example.availability_zone
  cidr_block        = cidrsubnet(aws_vpc.outpost.cidr_block, 8, 0)
  outpost_arn       = data.aws_outposts_outpost.example.arn
  vpc_id            = aws_vpc.outpost.id
}

resource "aws_s3outposts_endpoint" "outpost" {
  outpost_id        = data.aws_outposts_outpost.test.id
  security_group_id = aws_security_group.outpost.id
  subnet_id         = aws_subnet.outpost.id
}

resource "aws_s3control_bucket" "outpost" {
  bucket     = "example"
  outpost_id = data.aws_outposts_outpost.example.id
}

resource "aws_s3control_bucket_lifecycle_configuration" "example" {
  bucket = aws_s3control_bucket.outpost.arn

  rule {
    id = "example"

    expiration {
      days = 123
    }

    filter {
      prefix = "example"
    }
  }
}

resource "aws_s3control_bucket_policy" "outpost" {
  bucket = aws_s3control_bucket.outpost.arn
  policy = "{...}"
}

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

  vpc_configuration {
    vpc_id = aws_vpc.outpost.id
  }
}

resource "aws_datasync_agent" "outpost" {
  # ... configuration ...
}

resource "aws_datasync_location_s3" "outpost" {
  agent_arns    = [aws_datasync_agent.outpost.arn]
  s3_bucket_arn = aws_s3_access_point.outpost.arn
  s3_storage_class = "OUTPOSTS"
  subdirectory  = "/"

  s3_config {
    bucket_access_role_arn = aws_iam_role.example.arn
  }
}

# Region Configuration

resource "aws_vpc" "region" {
  cidr_block = "10.1.0.0/16"
}

resource "aws_security_group" "region" {
  vpc_id = aws_vpc.region.id
}

resource "aws_subnet" "region" {
  availability_zone = data.aws_outposts_outpost.example.availability_zone
  cidr_block = cidrsubnet(aws_vpc.region.cidr_block, 8, 0)
  vpc_id = aws_vpc.region.id
}

resource "aws_s3_bucket" "region" {
  bucket = "example"
}

resource "aws_datasync_location_s3" "region" {
  s3_bucket_arn = aws_s3_bucket.region.arn
  subdirectory  = "/example/prefix"

  s3_config {
    bucket_access_role_arn = aws_iam_role.example.arn
  }
}

# Bridging Configuration

resource "aws_datasync_task" "example" {
  destination_location_arn = aws_datasync_location_s3.region.arn
  name                     = "example"
  source_location_arn      = aws_datasync_location_s3.outposts.arn
}

References

@bflad bflad added new-resource Introduces a new resource. new-data-source Introduces a new data source. service/s3control Issues and PRs that pertain to the s3control service. labels Oct 1, 2020
@bflad bflad self-assigned this Oct 1, 2020
@ghost ghost added service/datasync Issues and PRs that pertain to the datasync service. service/outposts Issues and PRs that pertain to the outposts service. service/s3 Issues and PRs that pertain to the s3 service. labels Oct 1, 2020
@ghost ghost added the service/ec2 Issues and PRs that pertain to the ec2 service. label Oct 1, 2020
bflad added a commit that referenced this issue Oct 3, 2020
Reference: #15412
Reference: #15417

Also prepares the repository for `aws_s3control_*` resources, which will be included with the S3 on Outposts functionality.

Output from acceptance testing:

```
--- PASS: TestAccAWSProvider_Endpoints (5.73s)
```
bflad added a commit that referenced this issue Oct 9, 2020
Reference: #15412
Reference: #15416

Output from acceptance testing:

```
Pending
```
bflad added a commit that referenced this issue Oct 9, 2020
Reference: #15412
Reference: #15417

Output from acceptance testing:

```
--- PASS: TestAccAWSS3OutpostsEndpoint_basic (193.07s)
--- PASS: TestAccAWSS3OutpostsEndpoint_disappears (193.29s)
```
bflad added a commit that referenced this issue Oct 12, 2020
Reference: #15412
Reference: #15417

Also prepares the repository for `aws_s3control_*` resources, which will be included with the S3 on Outposts functionality.

Output from acceptance testing:

```
--- PASS: TestAccAWSProvider_Endpoints (5.73s)
```
bflad added a commit that referenced this issue Oct 12, 2020
Reference: #15412
Reference: #15416

Output from acceptance testing:

```
Pending
```
bflad added a commit that referenced this issue Oct 12, 2020
Reference: #15412
Reference: #15417

Output from acceptance testing:

```
--- PASS: TestAccAWSS3OutpostsEndpoint_basic (193.07s)
--- PASS: TestAccAWSS3OutpostsEndpoint_disappears (193.29s)
```
bflad added a commit that referenced this issue Oct 12, 2020
Reference: #15412
Reference: #15415

Output from acceptance testing (note everything except AbortIncompleteMultipartUpload was tested before losing Outpost access):

```
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_basic (59.06s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_disappears (59.96s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Expiration_Date (70.35s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Expiration_Days (57.63s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Filter_Prefix (64.31s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Filter_Tags (62.22s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Id (73.91s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Status (65.70s)
```
bflad added a commit that referenced this issue Oct 12, 2020
Reference: #15412
Reference: #15416

Output from acceptance testing:

```
Pending
```
bflad added a commit that referenced this issue Oct 12, 2020
Reference: #15412
Reference: #15415

Output from acceptance testing (note everything except AbortIncompleteMultipartUpload was tested before losing Outpost access):

```
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_basic (59.06s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_disappears (59.96s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Expiration_Date (70.35s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Expiration_Days (57.63s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Filter_Prefix (64.31s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Filter_Tags (62.22s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Id (73.91s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Status (65.70s)
```
@ghost ghost added the service/s3outposts Issues and PRs that pertain to the s3outposts service. label 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: #15416

Output from acceptance testing:

```
Pending
```
bflad added a commit that referenced this issue Oct 16, 2020
Reference: #15412
Reference: #15415

Output from acceptance testing (note everything except AbortIncompleteMultipartUpload was tested before losing Outpost access):

```
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_basic (59.06s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_disappears (59.96s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Expiration_Date (70.35s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Expiration_Days (57.63s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Filter_Prefix (64.31s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Filter_Tags (62.22s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Id (73.91s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Status (65.70s)
```
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: #15416

Output from acceptance testing:

```
Pending
```
bflad added a commit that referenced this issue Oct 16, 2020
Reference: #15412
Reference: #15415

Output from acceptance testing (note everything except AbortIncompleteMultipartUpload was tested before losing Outpost access):

```
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_basic (59.06s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_disappears (59.96s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Expiration_Date (70.35s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Expiration_Days (57.63s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Filter_Prefix (64.31s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Filter_Tags (62.22s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Id (73.91s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Status (65.70s)
```
bflad added a commit that referenced this issue Oct 16, 2020
Reference: #15412
Reference: #15417

Output from acceptance testing:

```
--- PASS: TestAccAWSS3OutpostsEndpoint_basic (193.07s)
--- PASS: TestAccAWSS3OutpostsEndpoint_disappears (193.29s)
```
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 27, 2020
* New Resource: aws_s3control_bucket_policy

Reference: #15412
Reference: #15416

Output from acceptance testing:

```
Pending
```

* tests/resource/aws_s3control_bucket_policy: Fixes since Public Access Block is always enabled for S3 Control Buckets

Output from acceptance testing:

```
--- PASS: TestAccAWSS3ControlBucketPolicy_disappears (32.85s)
--- PASS: TestAccAWSS3ControlBucketPolicy_Policy (43.13s)
--- PASS: TestAccAWSS3ControlBucketPolicy_basic (106.91s)
```

* resource/aws_s3control_bucket_policy: terrafmt fixes

* Update aws/resource_aws_s3control_bucket_policy_test.go
bflad added a commit that referenced this issue Oct 27, 2020
Reference: #15412
Reference: #15417

Output from acceptance testing:

```
--- PASS: TestAccAWSS3OutpostsEndpoint_basic (193.07s)
--- PASS: TestAccAWSS3OutpostsEndpoint_disappears (193.29s)
```
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 28, 2020

Much of the support for this is landing in version 3.13.0 of the Terraform AWS Provider, later this week. See the Features and Enhancements section above for links to the functionality covered and remaining items. For further feature requests or bug reports with this functionality not covered here, please file a new issue following the issue template. Thanks. 👍

@bflad bflad closed this as completed Oct 28, 2020
bflad added a commit that referenced this issue Oct 28, 2020
* New Resource: aws_s3control_bucket_lifecycle_configuration

Reference: #15412
Reference: #15415

Output from acceptance testing (note everything except AbortIncompleteMultipartUpload was tested before losing Outpost access):

```
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_basic (59.06s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_disappears (59.96s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Expiration_Date (70.35s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Expiration_Days (57.63s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Filter_Prefix (64.31s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Filter_Tags (62.22s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Id (73.91s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Status (65.70s)
```

* Apply suggestions from code review

* resource/aws_s3control_bucket_lifecycle_configuration: go fmt
@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
new-data-source Introduces a new data source. new-resource Introduces a new resource. service/datasync Issues and PRs that pertain to the datasync service. service/ec2 Issues and PRs that pertain to the ec2 service. service/outposts Issues and PRs that pertain to the outposts service. service/s3control Issues and PRs that pertain to the s3control service. service/s3outposts Issues and PRs that pertain to the s3outposts service. service/s3 Issues and PRs that pertain to the s3 service.
Projects
None yet
Development

No branches or pull requests

1 participant