Open david-forster10 opened 1 year ago
Voting for Prioritization
Volunteering to Work on This Issue
@david-forster10 have you tried appending no_redirect
to gateway_vpc_endpoint value?
Apologies for the delay on responding, appending the no_redirect
value results in an error as the module is programmed to expect the 302 redirect response:
expected HTTP status code 302, received: 200
Description
While working in a closed network, trying to activate the Storage Gateway is failing due to a ClientTimeout when the API call redirects to the external AWS endpoints. When manually using the "no_redirect" option in the activation call, I am presented with an activation token without error.
Failing activation address due to redirect: http://xxx.xxx.xxx.xxx/?activationRegion=eu-west-2&vpcEndpoint=vpce-xxxxxxxxxxxxxxx-xxxxxx.storagegateway.eu-west-2.vpce.amazonaws.com
Successful activation address with using the no_redirect flag: http://xxx.xxx.xxx.xxx/?activationRegion=eu-west-2&vpcEndpoint=vpce-xxxxxxxxxxxxxxx-xxxxxx.storagegateway.eu-west-2.vpce.amazonaws.com&no_redirect
By allowing the inclusion of the no_redirect flag improves automation compatibility for systems in closed networks.
Affected Resource(s) and/or Data Source(s)
aws_storagegateway_gateway
Potential Terraform Configuration
References
no_redirect flag is mentioned in "Deploying the solution" - Step 3 from the following aws blog post: https://aws.amazon.com/blogs/storage/mounting-amazon-s3-to-an-amazon-ec2-instance-using-a-private-connection-to-s3-file-gateway/
The no_redirect flag is also referred to under the Linux (curl) documentation here: https://docs.aws.amazon.com/storagegateway/latest/vgw/get-activation-key.html
Would you like to implement a fix?
No