Google Certified Associate Cloud Engineer 2020

Sign Up Free or Log In to participate!

Project metadata is empty


I’ve run all the steps to ssh into the VM, but there’s nothing under

The instance already has my public SSH key in ~/.ssh/authorized_keys, but the metadata doesn’t show up anything.

For those who would still want to see details about their project (especially the SSH key metadata part), they can issue the following commands in the Cloud Shell:

gcloud config set project MY-PROJECT-ID

gcloud compute project-info describe –format=json | jq -r ".commonInstanceMetadata"

Hope this helps.

Nanda Kumar

I have manually set the project metadata via command: gcloud compute project-info add-metadata –metadata google-compute-default-region=us-west2,google-compute-default-zone=us-west2-b. When I use the curl command to view the project specific metadata that I have set it comes empty – curl "" -H "Metadata-Flavor: Google". What I have understood after reading documentation for nearly an hour is that the curl command can be used to query only instance specific metadata and not project metadata. So, the only way to get the project metadata is run – gcloud compute project-info describe. Please confirm if my understanding is correct. Thanks.

1 Answers


Nevermind. In the scenario described in the question I was actually logged out of "myhappyvm" instance. I saw that I still have to be ssh-ed into the actual VM to view the metadata shown in the video. I thought that the metadata can be queried by the Cloud Shell too.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?