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)
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"
}
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
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!
Most helpful comment
Support for the
gateway_vpc_endpointargument on theaws_storagegateway_gatewayresource 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. 👍