Permissions; Cloud Run continuous deployment from Code Source Repositories.

Hi,

I am having a hard time finding good documentation about this but I am looking to enable continuous integration between my web application running in Cloud Run, and my code replicated from Gitlab to Code Source. The Cloud Run instance and Code Source are on different projects on shared VPCs. In Cloud Run, when I click on Continuous Integration and then click the dropdown to select the repository, nothing is there. I assume this is related to Cloud Run not having permission to Code Source but I've not been able to figure this out even after following GCP documentation.

Could you please provide me with some instructions on how I can get this to work? I understand that this functionality utilizes several services including Artifact Registry and Cloud Build, both of which are enabled in the Cloud Run project. 

Thank you,

-Ronny

0 2 160
2 REPLIES 2

Hello @RcardonaFinch,

Check Connecting to a Shared VPC Network. You can connect Cloud Run to a shared VPC network through:

In Serverless VPC Access Connectors, you can set it up in Shared VPC service projects that have Cloud Run resources needing access to your network, or in a VPC host project. You can configure it through the following:

As per deploying to Cloud Run with CI/CD and utilizing Cloud Source, Cloud Build, and Artifact Registry, you can check out this guide

If the above options don't work, you can contact Google Cloud Support to further look into your case. Let me know if it helped, thanks!

Thank you, Marramirez.

I already have a VPC connector which I use to allow Cloud Run to communicate with my GKE cluster. I have the VPC connecter setup successfully in my service project (same project as Cloud Run and GKE cluster).

With that said, what would I need to allow through my VPC connector firewalls, and what IAM changes would I need to make (if any) to allow Cloud Run access to my Source Code repos in a different project (but shared VPC)?

I appreciate the assistance. I don't pay for GCP Support, unfortunately.