I have a cloud run service, which sends requests to a number of domains:
domain3.com requires that all my requests are coming from the same static IP address
Is this possible to do so in cloud run?
I've found a guide on how to set up static outbound IP address. But I don't really understand whether it is possible to do that only for one specific domain.
If I understand correctly, it should be done (if possible) somewhere on the Cloud NAT
level.
Also, I guess that I would need to first "explore" an IP address of the domain3.com
in order to use that address in Cloud NAT.
From a Cloud Run service, you can't use a specific IP to reach only one domain and not the others.
On a Cloud Run service, you can plug a serverless VPC connector to route all
the traffic in that connector (I assume that your domain.com are public domain, therefore the all
parameter for the egress), and add a Cloud NAT to use your reserved IP(s). (here in the documentation)
Because you route ALL the traffic, you can't select for that domain (or IP) and not this one. It's ALL!