I'm working on a web project and I am trying to create three separate environments:

  • Development
  • Testing
  • Production

In testing and production I have instance groups that serve the web content through a load balancer. What I want to achieve is to stop all testing instances when testing is note being done, but I would like to not to have to delete the instance group and all it's configurations.


Try to use labels or tags when working with GCE resources, also a good name convention will be really helpful.

You could also check if Terraform or Deploy Manager could help you to improve your CD.

  • Luke, I'm already using labels, but I don't see how that's related to what I'm asking... – Luciano César Natale Feb 22 '19 at 16:41
  • 1
    Using just a load balancer and a backend you are not going to achieve what you are looking for, try to read more about continuous delivery but this isn't a specific question because you have way too many ways to improve your architecture. Labels and tags were in case that you wanted to delete instances from the instance group, or make quick changes more easily. I used Terraform and GKE cluster with MCI – Luke Feb 28 '19 at 9:50

It seems presently GCP dont have the option to stop any managed instance group as the documentation [1]. There is a public issue tracker [2] which could be followed where the product engineering team is working on this feature request. I hope link [3] [4] also helpful for you.

If you use an unmanaged instance group [5] there is an option that you could remove VMs from groups and stop the VM, I am not sure removal of VMs from an unmanaged instance group option is helpful for you. When you create an unmanaged instance group, no VMs are added to it automatically.

[1] https://cloud.google.com/compute/docs/instance-groups/

[2] https://issuetracker.google.com/162852391

[3] https://googlecloudplatform.uservoice.com/forums/302595-compute-engine/suggestions/13355934-stop-start-an-instance-group-to-save-money

[4] https://stackoverflow.com/questions/54948419/how-can-i-stop-gcp-instance-groups-from-terminating

[5] https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-unmanaged-instances#removing_vms

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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