slabsken
slabsken

Reputation: 35

How to get the active instance template name in a managed instance group

I am trying to get the instance template name of an instance group. In the GCP console, the instance template is included in the display (see sample screenshot). However, i cannot find a gcloud command that will give this info, for example:

gcloud compute instance-groups describe xxxx-instance-group --region=us-central1 --project=project_xxx

enter image description here

Upvotes: 1

Views: 856

Answers (1)

DazWilkin
DazWilkin

Reputation: 40416

I don't have access to gcloud currently but your either using the wrong command or the default output does not include the template.

IIRC templates only apply to managed IGs. There's a gcloud subcommand gcloud compute instance-groups managed describe that should include the value. If the default command does but, try appending e.g. --format=yaml.

A good way to corroborate this is using APIs Explorer. For the Compute Engine service there's a Managed Instance Group resource that does include template. See the response body for regionInstanceGroupManagers.get

Upvotes: 1

Related Questions