Search code examples
google-cloud-platformgoogle-cloud-run

how do I set up cloud run in a shared vpc with direct vpc egress?


In my GCP infrastructure, I have a security project (with VM as Firewall) that faces all entring and outgoing traffic to my gcp network. The security project is peered to an IT project that has a shared VPC with other projects. I have to use Cloud Run with static outbound IP, how should I configure it ?

I thought I use Direct VPC Egress to connect cloud run to the shared vpc. but I don't know if I will get a static IP for my outgoing traffic ? and does using cloud run in the same shared vpc as my GCE cause conflicts in IPs ?

thank you for your advices.


Solution

  • I could not find the service account of cloud run to add the network user role. SO When you are under IAM, please mark little checkbox , at the middle right screen " Include Google-provided role grants". This will show Google-managed service accounts which are used to access the APIs of Google Cloud Platform services.