I wanted to deploy the 100 VM for my customer as he want.But i dont want to create the 100 VM manually one by one . i wanted to create those VMs in single time in single click .Please provide the solution.
1 Answers
According to the official Google documentation and this post, there is a feature for creating instances, named instance templates. The latter lets you configure the instance’s properties, to be used in a managed group of Virtual Machines (VM) or individual VMs.
Quoting the documentation:
“An Instance Group is a collection of virtual machine (VM) instances that you can manage as a single entity.”
It contains identical instances that are based on an instance template. Here, you may find the instructions on how to create it.
When I tried to reproduce as an example (from the linked documentation), first I created an Instance Template with this command:
gcloud compute instance-templates create example-template-custom --machine-type n1-standard-4 --image-family debian-9 --image-project debian-cloud --boot-disk-size 250GB
And then when I executed this command:
gcloud compute instance-groups managed create example-group --base-instance-name test --size 3 --template example-template-custom
to create the Instance Group, 3 VMs have been created in my GCP Console with the names:
test-j1wl
test-ksg6
test-ps1b
on the region I specified from the Shell.
Alternatively, you can use Terraform to manage your GCP VM instances in a corresponding way, as stated in here.

- 133
- 5