Sarvesh M.D
Sarvesh M.D

Reputation: 360

Ubuntu - Running gcloud app deploy command is throwing error

I was following along this tutorial on YouTube. I created an empty project on gcp, then ran gcloud init and switched to that project, then I ran gcloud app deploy and I ran into problems. In this tutorial video, it was not mentioned that I should enable Cloud Build API to deploy. So I don't know if only not enabling the Cloud Build API was the problem or something else was the problem.

Here's my app.yaml
runtime: nodejs12

I've tried many other stack overflow posts' answers like this one, but nothing worked for me. When I run gcloud app deploy when I am inside my new project, I am getting this error:

ERROR: (gcloud.app.deploy) Error Response: [7] Access Not Configured. Cloud Build has not been used in project XXX before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/cloudbuild.googleapis.com/overview?project=[projectId] then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.

I am using Ubuntu 20.04 LTS - x86-64.

Upvotes: 0

Views: 818

Answers (1)

John Hanley
John Hanley

Reputation: 81336

You must complete two steps:

  1. Enable Google Cloud Billing.
  2. Enable Cloud Build API.

You cannot skip enabling Cloud Billing. Once you set up the Billing Account, you might have to wait a few minutes before you can enable APIs.

The first 120 minutes of Cloud Build time is free. Then you will be charged $.003 per minute.

The page is a collection of documents on Google Cloud Billing.

Google Cloud Billing Documentation

You can enable the Cloud Build API in the console or via the CLI.

Enable Cloud Build API in the console

gcloud services enable cloudbuild.googleapis.com

gcloud services enable

Upvotes: 2

Related Questions