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.
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 :).