I have to following setup:
- A VPC network
V
and a VPC Connector forV
using CIDR range "10.8.0.0/28" (EDITED) - The following services A and B are connected to the VPC via the Connector
- Cloud Run
Service A
: This service is set toingress=internal
to secure the API. Itsegress
is set to orprivate-ranges-only
- Cloud Run
Service B
: This service provides an API for anotherService C within the Azure Cloud
. B also needs access toService A
's API. Theegress
andingress
are set toall
to route all outgoing traffic through the VPC connector and allow for a successful request on internalService A
.
The current problem is the following: Requests from Service C -> Service B
return in a 504 Gateway Timeout. If the egress of Service B
is changed to private-ranges-only
the request of Service C succeeds but in return all requests of B -> A return 403 Forbidden since traffic is no longer routed through the VPC Connector because Cloud Run does not allow for private-ranges to send traffic to Service A(afaik). All requests of Cloud Run Services to other Cloud Run Services are currently issued to "*.run.app" URLs.
I can not come up with an idea for a possible and convenient fix for this setup. Is there an explanation why egress=all
in Service B
results in a Gateway Timeout of requests from Service C. I tried to follow logs from the VPC but did not see any causes.