IAM issue with Google Cloud Run service account

Viewed 72

I am trying to deploy my AutoML trained model using Cloud Run, but am having difficulties with IAM permissions. I'm using this as a guide, and keep getting the following error at the build step. I'm new to Cloud Run/GCP but as far as I can see, I have granted the right roles to the right accounts. I appreciate any assistance you can provide as I'm really stumped.

Error message:

Step #3: ERROR: (gcloud.run.deploy) User [REDACTED@cloudbuild.gserviceaccount.com] does not have permission to access namespaces instance [REDACTED] (or it may not exist): 

Google Cloud Run Service Agent does not have permission to get access tokens for the service account REDACTED@cloudbuild.gserviceaccount.com. 

Please give service-REDACTED@serverless-robot-prod.iam.gserviceaccount.com permission iam.serviceAccounts.getAccessToken on the service account. 

Alternatively, if the service account is unspecified or in the same project you are deploying in, ensure that the Service Agent is assigned the Google Cloud Run Service Agent role roles/run.serviceAgent.

Here are the roles assigned to the Cloud Run Service Agent enter image description here

Default service account has the Cloud Run Admin Role enter image description here

Here are the accounts to which I've given access to the Default compute service account, the Cloud Build Service Agent and Cloud Run Service Agent are added: enter image description here

0 Answers
Related