I am encountering an issue while deploying my NodeJS server using Google Cloud CLI and would appreciate some guidance. Here is the process I followed:
npm run build
for my project, which completed successfully.gcloud auth configure-docker
.gcloud run deploy
.However, the deployment fails with the following error:
ERROR: (gcloud.run.deploy) FAILED_PRECONDITION: failed precondition: due to quota restrictions, cannot run builds in this region. Please contact support
Here are some details about my setup:
europe-west3
I suspect the issue might be related to quota restrictions in the europe-west3
region, but I'm unsure how to confirm or resolve this. I have checked my account quota restrictions and it's okay, haven't reached it yet. Has anyone else faced a similar issue, or does anyone know how to work around?
A few users have upgraded to v460.0.0, and confirmed that this issue is now fixed.
On the Google Cloud CLI version 456.0.0 it was added the following:
Network Security
- Add
--billing-project
required flag togcloud network-security firewall-endpoints create
command to provide Google Cloud project ID for API enablement check, quota, and endpoint uptime billing.- Add
--update-billing-project
flag togcloud network-security firewall-endpoints update
command to update the Google Cloud project used for API enablement check, quota, and endpoint uptime billing. So it might be related.
And the --billing-account command seems like a beta feature:
(BETA) This command sets or updates the billing account associated with a project.
--billing-project=BILLING_PROJECTThe Google Cloud project that will be charged quota for operations performed in gcloud. If you need to operate on one project, but need quota against a different project, you can use this flag to specify the billing project. If both billing/quota_project and --billing-project are specified, --billing-project takes precedence. Run $ gcloud config set --help to see more information about billing/quota_project.
So I would recommend to set this value to your correct billing project, but even so, it feels like something is wrong from their side.
For more info: https://cloud.google.com/sdk/gcloud/reference/beta/billing/projects/link
I simply downgraded to 455.0.0 again and it deployed without a problem.
If you're deploying via GitHub actions:
- name: Cloud run deploy
uses: "google-github-actions/deploy-cloudrun@v2"
with:
...
gcloud_version: "455.0.0"
With gcloud CLI:
gcloud components update --version=445.0.0
With Gitlab deploy (.gitlab-ci.yml):
image: google/cloud-sdk:455.0.0