Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Service account permissions for cloud run to access other projects

I am using one dedicated cloud run job to fetch VM information of all the projects in GCP organization.

I am trying to use default service account attached with Cloud run job.  but this service account is not able to access other projects .

what permissions should i give to this Service account(cloud run) , so that my cloud run job can access other projects and fetch vm details of all the projects.

i even tried to add this Service account in IAM of other projects but it's giving access issue

0 1 3,286
1 REPLY 1

Hi @gcloudLearning!

Look into Multi-Project (Account) Service Account in GCP. You already have a service account but you can also check from the guide if you might have missed a step.

After creating a service account, grant access to other projects:

  1. Get the email you are using by navigating to IAM & Admin -> Service accounts in the project you are using.
  2. Go to the project where you want that service account to access. In IAM & Admin -> IAM click "ADD".
  3. In the New Principals section, Use the email from Step 1 and grant the role. You can then repeat steps 2 and 3 to give access to different projects.
  4. Your service account should now be able to access other projects.

You can also get in touch with Google Cloud Support if the above option doesn't work. Let me know if it helped, thanks!