0

Currently my projects in Cloud Run that make external requests come out with random IP from Google IP's pool.

A new micro-service that I am developing that needs to make an external request on a critical external micro-service that is limited by IP.

Google Cloud Platform has any solution to channel the output from a specific IP to the outside? Some kind of proxy for these kinds of needs?

Thanks

Nibrass H
  • 2,403
  • 1
  • 8
  • 14
  • 1
    Per now I don't think there is a way to make the Cloud Run accessible only for certain IPs. Please also have a look into this [post](https://stackoverflow.com/questions/59014001/ip-filtering-on-google-cloud-run/59035913#59035913) and [this one.](https://stackoverflow.com/a/59519420/8791788) – Nibrass H Sep 04 '20 at 10:30
  • 1
    See my comment on the answer, it's coming, but not available today, and I haven't timeline to provide – guillaume blaquiere Sep 04 '20 at 12:14

1 Answers1

0

As clarified in this other case here, there is no way to directly setup a static or specific IP for outbound requests for Cloud Run. The only possibility as clarified in this answer from a Google's developer, unless Cloud Run starts supporting Cloud NAT or Serverless VPC Access, you won't be able to achieve such configuration.

There are some workarounds.

  • One of them would be to create a SOCKS proxy by running a ssh client that routes the traffic through a GCE VM instance that has a static external IP address. More details here.
  • Another solution is to send your outbound requests through a proxy that has a static IP. You can get details here.

Both these two were provided by developers from Google, so they should be good to go and use it.

gso_gabriel
  • 4,199
  • 1
  • 10
  • 22
  • 1
    The serverless connector is now compliant with Cloud Run, but, not yet the Cloud Nat compatibility (at least in public beta). The feature is coming and currently under tests. Stay tuned! – guillaume blaquiere Sep 04 '20 at 12:14