Skip to content
Google CloudGoogle Compute EngineCompute

google_compute_instance_group_manager cost estimation

A managed instance group that runs and autoscales a fleet of identical VMs, billed as the Compute Engine instances. 3× e2-medium is ~$73/month.

A google_compute_instance_group_manager (MIG) runs a fleet of identical VMs from an instance template, with autohealing, autoscaling, and rolling updates. The manager itself has no charge, it bills as the Compute Engine instances it runs: target_size × the instance template's machine-type rate. Three e2-medium instances (~$0.0335/hour each) is ~$73.37/month, plus each instance's boot disk.

The cost mechanics are identical to running the VMs directly; the MIG just manages them. The defining lever is autoscaling: a MIG with an attached autoscaler grows and shrinks target_size with demand (CPU, load-balancing utilization, or custom metrics), so you pay for instances only when load needs them. A MIG pinned at a fixed target_size pays for that capacity 24/7.

The other levers are the same as any VM fleet: right-size the machine type in the template, use Spot VMs (in the template) for fault-tolerant workloads at 60-91% off, and apply committed-use discounts to the steady baseline.

c3x prices the MIG from the template's machine type and target_size, so the fleet cost is visible before deployment.

Terraform example

A minimal but realistic configuration that C3X can estimate.

resource "google_compute_instance_group_manager" "workers" {
  name               = "worker-mig"
  base_instance_name = "worker"
  zone               = "us-central1-a"
  target_size        = 3

  version {
    instance_template = google_compute_instance_template.worker.id
  }
}

Pricing dimensions

What you actually pay for when you provision google_compute_instance_group_manager.

DimensionUnitWhat's being charged
Instancesper instance-hourtarget_size × the instance template's machine-type rate, billed continuously. An autoscaler varies target_size with demand.
$0.0335/instance-hour for e2-medium → 3 instances ≈ $73.37/month
Boot disksper GB-monthEach instance's boot disk (pd-balanced ~$0.10/GB-month) bills separately.

Sample C3X output

Three e2-medium instances (fixed target_size), 24/7:

google_compute_instance_group_manager.workers
└─ Instances (e2-medium × 3)   2190 instance-hours   $73.37
                               Monthly               $73.37

Optimization tips

Common ways to reduce google_compute_instance_group_manager cost without changing the workload.

Attach an autoscaler instead of a fixed size

Often 30 to 50% on variable load

A MIG pinned at a fixed target_size pays for that capacity 24/7. An attached autoscaler grows/shrinks the fleet with demand (CPU, LB utilization, custom metrics), so you pay for instances only when load needs them.

Use Spot VMs in the template for fault-tolerant fleets

Up to ~91% on Spot instances

Set the instance template to Spot for stateless, fault-tolerant workers, 60-91% below on-demand. Keep a small on-demand baseline for guaranteed capacity and burst on Spot.

Right-size the machine type and apply CUDs

37 to 55% on the baseline

Match the template's machine type to the workload, and cover the steady baseline with committed-use discounts (1-3 year) for 37-55% off. Sustained-use discounts apply automatically on top.

FAQ

How is a GCP Managed Instance Group billed?

As the Compute Engine instances it runs, target_size × the instance template's machine-type rate, plus boot disks. The manager itself is free. Three e2-medium instances is ~$73/month. An autoscaler varies the instance count with demand.

How do I reduce MIG cost?

Attach an autoscaler so the fleet scales with demand instead of running a fixed peak size, use Spot VMs in the instance template for fault-tolerant workers, right-size the machine type, and cover the baseline with committed-use discounts.

How does c3x estimate the cost?

From the instance template's machine type and target_size, pricing instance-hours. Autoscaling means actual cost tracks the running count; the estimate reflects the configured target size.

Related resources

More Google Cloud resources

Estimate this resource in your own Terraform

Free, open source, no API key. C3X parses your Terraform and shows line-item cost for every resource, including google_compute_instance_group_manager.