Ensure that instance groups have the autoscale feature enabled.
Risk Level: Low
Description
This plugin checks if instance groups have autoscale disabled for high availability. Autoscaling automatically adds more VMs while scaling up and deletes VMs while scaling down.
About the Service
Google Cloud Compute Engine:
Google Cloud Compute Engine is a service that allows you to create Virtual Machines based on your preferences and run them on Google’s infrastructure. You can either use their predefined machines with certain default configurations or create your own custom Virtual Machine to meet your exact requirements. To know more, read here.
Impact
When the autoscaling feature for Google Cloud Instance Groups is disabled, any rise or drop in load can create a lot of problems. Traffic management could become chaotic and difficult. This also results in ineffective cost management.
Steps to Reproduce
Using GCP Console-
- Log In to your GCP Console.
- From the top navigation bar, select the GCP project you want to investigate.
- From the navigation panel on the left side of the console, go to Compute Engine and select Instance groups. You can click this link here to navigate directly if you’re already logged in.
- Select the instance groups you want to investigate from the list of instance groups available in your GCP project.
- In the Overview tab, check the status of Autoscaling. If it is set to Off, then auto-scaling is disabled for this selected instance group.
- Repeat steps 4 and 5 for all the VM instance groups you want to investigate in the selected project.
- If you have multiple projects that you want to investigate, repeat steps 2 to 6 for each project in your GCP console.
Steps for Remediation
Determine whether or not you truly require autoscaling to be disabled. If not, make the necessary changes to enable autoscaling of your VM instance groups.
The steps to enable autoscaling are-
Using GCP Console-
- Log In to your GCP Console.
- From the top navigation bar, select the GCP project you want to investigate.
- From the navigation panel on the left side of the console, go to Compute Engine and select Instance groups. You can click this link here to navigate directly if you’re already logged in.
- Select the instance groups you want to investigate from the list of instance groups available in your GCP project. (In case you aren’t sure which instance group needs to be configured, follow the steps to reproduce listed above to determine which instance to choose.)
- Select the Edit option from the top navigation bar of the selected VM instance group page.
- Under the Autoscaling section, select Auto-scale from the dropdown list to turn on auto-scaling for the selected instance group.
- Click Save to save the changes.
- Repeat steps 4 to 7 for all the VM instances you want to reconfigure in the selected project.
- If you have multiple projects, repeat steps 2 to 8 for each project in your GCP console.