1

I need to create a VM template using gcloud tool in the google cloud shell. There are far too many options to set each time in the gcloud documentation. Is it possible for me to issue something like gcloud compute instance-templates create <template name> --config-options-file=<config options file name>?

1 Answer 1

2

Whilst I cannot find anything simailr to --config-file flag option in the official documentation for 'gcloud compute instance-templates create' there is an alternative way of creating instance template resources via gcloud.

It's possible to use gcloud commands in conjunction with the deployment manager. This can be used to deploy resources, including instance templates.

For more information, please take a look here which includes information and a quickstart to familiarise yourself with creating deployments to deploy resources via configuration files.

You will find a list of the supported resource types here. As you can see there is an option for compute.beta.instanceTemplate.

I've also created a feature request for your request (for a config-file option) which you can follow the progress of here.

Not the answer you're looking for? Browse other questions tagged or ask your own question.