Running gcloud beta run deploy --image gcr.io/mynippets-dev/web:latest
when gcloud project is set to 'mysnippets-dev' returns the following:
ERROR: (gcloud.beta.run.deploy) Google Cloud Run Service Agent must have permission to read the image, gcr.io/mynippets-dev/web:latest. Ensure that the provided container image URL is correct and that the above account has permission to access the image. If you just enabled the Cloud Run API, the permissions might take a few minutes to propagate. Note that [mynippets-dev/web] is not in project [mysnippets-dev]. Permission must be granted to the Google Cloud Run Service Agent from this project
It should be noted that both the GCR image and the Cloud Run account live in project 'mysnippets-dev'
. But for some reason, it thinks it's a cross project deployment and maybe thinking it's 'mynippets-dev/web'
with the /web
(the GCR repository).
I can also repro the same issue in Cloud Run UI.
Deployment should succeed.