I'm just starting to play with Google Compute Engine. I can create instances using the web interface, but nothing works from the console:
gcloud compute instances create example-instance \
> --machine-type n1-standard-1 \
> --image debian-7 \
> --zone europe-west1-b
ERROR: (gcloud.compute.instances.create) Failed to find image for alias [debian-7] in public image project [debian-cloud].
- Invalid value for project: myproject
It looks like the image is available.
$ gcloud compute images list --project debian-cloud --no-standard-images
NAME PROJECT ALIAS DEPRECATED STATUS
backports-debian-7-wheezy-v20150929 debian-cloud debian-7-backports READY
beta-accounts-backports-debian-7-wheezy-v20150930 debian-cloud READY
beta-accounts-debian-8-jessie-v20150930 debian-cloud READY
debian-7-wheezy-v20150929 debian-cloud debian-7 READY
debian-8-jessie-v20150929 debian-cloud debian-8 READY
ERROR: (gcloud.compute.images.list) Some requests did not succeed: - Invalid value for project: myproject
I get an - Invalid value for project: myproject message for almost every gcloud command I try.
I can see myproject when I visit https://console.developers.google.com/project?authuser=1 And from the console:
$ gcloud config list project
[core]
project = myproject
What should I do to fix this?
My mistake.
I mixed project_name and project_id.
$ gcloud config set project PROJECT_ID #(not project name)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With