title: AWS: Resource policy for an AWS HTTPS API Gateway to restirct access to specific IP's
body: <p>Recently AWS released HTTPS based API Gateway(Not the REST one). We use Terraform to manage the AWS resources and we have a service where we create the AWS HTTPS API Gateway resource, there was a security concern that we were allowing any IP/system to invoke the API, hence we planned to add a policy (Resource Policy) to restrict access to only specific IP's. It was easy to achieve this for REST API Gateway as we have <em>aws_api_gateway_rest_api_policy</em> resource to create and attach the policy to the Gateway through Terraform, but the same could not be achieved for HTTPS API Gateway. We use <em>aws_apigatewayv2_api</em> to create an HTTPS Gateway resource, but couldn't find a resource to atatch a policy or neither it has an option to specify policy while creating the Gateway itself. Any help here would be very much appreciated to know how to attach a policy to HTTPS based API. Thanks.</p>