Terraform-provider-aws: Add VPC Endpoint option to storage gateway

Created on 29 Aug 2019  ·  8Comments  ·  Source: hashicorp/terraform-provider-aws

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 "me too" comments, 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

Looking for an option to be added to the creation of the storage gateway for a gateway created in a private subnet (using a VPC endpoint)

New or Affected Resource(s)

  • aws_storagegateway_gateway

Potential Terraform Configuration

resource "aws_storagegateway_gateway" "example" {
  gateway_ip_address = "192.168.0.1"
  gateway_name       = "test"
  gateway_timezone   = "GMT"
  gateway_type       = "FILE_S3"
  gateway_vpc_endpoint = "vpce-id.storagegateway.us-east-1.vpce.amazonaws.com"
}

References

https://docs.aws.amazon.com/storagegateway/latest/userguide/create-gateway-file.html#GettingStarted-service-endpoint-file

Code should go before this Line
https://github.com/terraform-providers/terraform-provider-aws/blob/master/aws/resource_aws_storagegateway_gateway.go#L149

And should add &vpcEndpoint=VPCENDPOINT_VARIABLE to http request

example:
http://192.168.0.1/?activationRegion=us-east-1&vpcEndpoint=vpc-id.storagegateway.us-east-1.vpce.amazonaws.com

Also looks like you need to set it using this method:

https://github.com/aws/aws-sdk-go/blob/master/service/storagegateway/api.go#L11176

enhancement servicstoragegateway

Most helpful comment

Support for the gateway_vpc_endpoint argument on the aws_storagegateway_gateway resource has been merged and will release with version 2.60.0 of the Terraform AWS Provider, later this week. Thanks to @jecafarelli for the implementation. 👍

All 8 comments

I created a PR for this code change, and I built and tested it following the guidelines in the contribution page. It is working for me with the manual testing I have done, I just dont have a good way to run the acceptance tests against an aws account so I cant finish.

Creating a valid test to test the VPC endpoint would also be a bit different then the current setup in the test as you would need to create an ec2 instance within a private subnet, create a vpc endpoint, and also have a peering connection from your local network to the private network in aws so you could also hit the ec2 instance with http.

Tested this last month successfully. Adding testing details in the PR.

Any update on storage gateway to accept a vpc endpoint release??

Hello any news on vpc endpoint release ?

Hello, yes please any news for the release which add this storage gateway option ?

Support for the gateway_vpc_endpoint argument on the aws_storagegateway_gateway resource has been merged and will release with version 2.60.0 of the Terraform AWS Provider, later this week. Thanks to @jecafarelli for the implementation. 👍

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

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!

Was this page helpful?
0 / 5 - 0 ratings