2

I want to set a static outbound IP address for my App Engine instance, hence I went through this documentation. I followed all the steps but I am not able to see any traffic logged in the Cloud NAT for the IP address I specified in step 5 (Reserve a static IP address). I realized that this documentation is applicable for App Engine Standard environment and I deploy the instances of my application in App Engine Flex Environment. Does this documentation apply to App Engine Flex Environment as well? If not, how should I setup outbound static IP address for my App Engine flex instances?

VMA
  • 89
  • 1
  • 4
  • 16
  • Did you try the method in the documentation? What was the result? Did you compare costs between App Engine Flexible + that method versus using Compute Engine? App Engine is not designed for your use case. While it is possible (VPC Connector + Cloud NAT), the pain of configuration plus costs indicates Compute Engine is often the better solution. You can also tunnel your traffic through a small GCE instance - I use SSH tunneling to GCE when I need to speak to an IP restricted API. However, the more services you deploy the more fragile the solution becomes. – John Hanley Dec 17 '21 at 19:51
  • How should I tunnel my app engine traffic through the GCE instance? I am deploying a Java application using a docker. – VMA Dec 17 '21 at 20:03
  • 1) Create an SSH tunnel on GCE: https://www.ssh.com/academy/ssh/tunneling 2) Configure your Java App to call the tunnel endpoint which will forward the traffic to the API. https://www.ssh.com/academy/ssh/tunneling/example#local-forwarding – John Hanley Dec 17 '21 at 20:14
  • Test the SSH tunnel (running on GCE) by using curl from your desktop. Configure SSH to forward traffic to an endpoint that returns your public IP address such as https://ipinfo.io/ip. Once you have the tunnel configured correctly then update your Java App. – John Hanley Dec 17 '21 at 20:22
  • 3
    Does this answer your question? [Is it possible to assign a static external IP to App Engine Flex?](https://stackoverflow.com/questions/69013607/is-it-possible-to-assign-a-static-external-ip-to-app-engine-flex) – Jose German Perez Sanchez Dec 17 '21 at 21:49

0 Answers0