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

ESPV2 Cloud Run deploy not working due to permission error

Each time we run the following command to deploy a new ESPV2 Cloud Run version: 
gcloud run deploy <cloud_run_service_name> --image="<image_name>" --set-env-vars=ESPv2_ARGS=--cors_preset=basic --timeout=600s --allow-unauthenticated --platform managed --project=<project_name>

 We get the this error: 

Cloud Run API check failed. Requests will be rejected after January 2025 hard enforcement deadline. User does not have access to image gcr.io/dev-plenion-cloud/endpoints-runtime-serverless:no-new-use-public-image-2.48-desarrollo-api.plenion247.eu-2024-11-27r2

All the permissions (Cloud Run Admin, Cloud Run Developer, Storage Object viewer...) are already granted to the users we have to make the deploy. 

Is there any information about the error? Couldn't find anything, and we cannot upload new versions of our endpoints. 

1 4 945
4 REPLIES 4

Hello
I have same issue and also ESPV2 Cloud Run deploy error

Storing the new images in an Artifact Registry folder instead of the Container Registry has solved it for me. After making this change, I was able to deploy new version of our Cloud Run services without encountering any permission-related errors, and I was able to make request to the newest endpoints of my service.

Hi @AgustinTheCloud

Welcome to Google Cloud Community!

Have you tried to build a new ESPv2 image before deploying the ESPv2 container? As these steps are needed every time you modify and redeploy the Endpoints service configuration.

You can also inspect Cloud Logging to check for the logs and events under Logs Explorer for the summary of the issue.

I hope the above information is helpful.

Hi @ronnelg,

Yes I've already tried (I always use to build new images for new Cloud Run revisions). Indeed, the build seems to be done and pushed correctly.

The main problem seems to be related with the Container Registry.
As it is already deprecated, I decided to push the images to Artifact Registry (-g option with the script) and after that, deploying the ESPv2 container worked.