Error while creating Instance in gcloud ?. How to create an instance using Google Cloud

475 views Asked by At

Im trying to create instance in google cloud using the following command gcloud compute instances create my-first-instance --zone us-central1-a

But it threws error as

Failed to find an image for alias [debian-backports] in public image project [debian-cloud]. Acces not configured. The API is not enabled for your project. Please use the Google App Developers Console to update your configuration.

Someone suggest me how to update this configuration and how to create an instance successfully.

2

There are 2 answers

0
Deepraj Mandal On

(gcloud.compute.instances.create) The required property project is not currently set.
It can be set on a per-command basis by re-running your command with the --project flag.

You may set it for your current workspace by running:

$ gcloud config set project VALUE

or it can be set temporarily by the environment variable [CLOUDSDK_CORE_PROJECT]

0
Karel Jakubec On

It seems that your account does not have "Compute Engigine API" enabled, so you have to enable 'Google Compute Engine' API in the Developers Console.

Click on "APIs & Auth" -> Compute Engine API -> Enable.