Google Compute Engine

Autoscale Disabled

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-

  1. Log In to your GCP Console.
  2. From the top navigation bar, select the GCP project you want to investigate.
  3. 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.
  4. Select the instance groups you want to investigate from the list of instance groups available in your GCP project.
  5. 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.
  6. Repeat steps 4 and 5 for all the VM instance groups you want to investigate in the selected project.
  7. 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-

  1. Log In to your GCP Console.
  2. From the top navigation bar, select the GCP project you want to investigate.
  3. 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.
  4. 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.)
  5. Select the Edit option from the top navigation bar of the selected VM instance group page.
  6. Under the Autoscaling section, select Auto-scale from the dropdown list to turn on auto-scaling for the selected instance group.
  7. Click Save to save the changes.
  8. Repeat steps 4 to 7 for all the VM instances you want to reconfigure in the selected project.
  9. If you have multiple projects, repeat steps 2 to 8 for each project in your GCP console.