Google Certified Associate Cloud Engineer 2020

Sign Up Free or Log In to participate!

list 0

gcloud compute machine-types list –filter="NAME:f1-micro AND ZONE-us-west" this command doesnt give me any ouput, also same if i put east instead of west. it says 0 items.

1 Answers

There’s a typo mistake in your command. It should be ZONE:us-west instead (it’s a colon :, not hyphen -).

However if you type that with correct syntax, there will be a small warning from gcloud saying that:

zone:us-west currently matches but will not match in the near future.

So there are two ways to make it right:

  • Use simple matching pattern (with colon :) and indicate a particular zone, like this: --filter="NAME:standard AND ZONE:us-west1-a"

  • Use regular expression pattern (with tilde ~), like this: --filter="NAME:standard AND ZONE ~ ^us-west"

I would recommend to filter by a specific zone (e.g. us-west1-a so that you won’t be overwhelmed by a bunch of similar results from other zones :).

Sign In
Welcome Back!

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

Get Started
Who’s going to be learning?