I wonder if someone can help.
I have some running instances. I'd like to get the image name of an instance boot disk (e.g., debian-10-buster-v20200618). It shows in the GCP console but neither of these commands fetch it:
gcloud compute instances list gcloud compute instances list --format=json Is there a way for GCloud to access this value? Could something (JS?) go directly to an API? Perhaps accessing the image family would be more useful but that probably needs to be derived from the image name. Could be that I'm missing something obvious :/
Any thoughts or suggestions gratefully received!
Rik
Solution Create an instance
gcloud compute instances create instance-1 --zone=europe-west1-b Determine the image on which it was based
gcloud compute disks describe instance-1 --zone=europe-west1-b --format=json | jq -r .sourceImage (I've used JQ to filter down the response; W_B -- many thanks BTW -- uses Awk)
 google-cloud-platform
google-cloud-platform