How to increase boot disk size for GCP private workers

Last updated: September 16, 2025

If your private workers hosted in GCP are running out of storage space, you can increase the boot disk size by modifying your Terraform configuration. This requires forking the module and adding a disk size parameter.

Solution: Fork the module and add disk_size_gb parameter

To increase the boot disk size, you need to create a local fork of the GCP worker pool module and modify the google_compute_instance_template resource.

Update the disk block in your Terraform configuration:

disk {
  source_image  = var.image
  disk_size_gb  = var.boot_disk_size_gb  # Add this line
  auto_delete   = true
  boot          = true
}

Then add the corresponding variable in your variables.tf file:

variable "boot_disk_size_gb" {
  description = "Boot disk size in GB"
  type        = number
  default     = 50  # Set to your desired size
}

Important: By default, GCP assigns boot disk size based on the image's minimum requirements. You must explicitly set disk_size_gb to get more space.

Deployment options

You have two approaches for implementing this change:

Option 1: Replace existing workers (with downtime)

  • Apply the configuration changes to your existing worker pool

  • New instances will replace the old ones

  • Warning: In-flight runs on old workers will fail when VMs are deleted

  • Schedule during off-peak hours and pause critical stacks

  • New VMs will register with the same token and continue operating as the same worker pool

Option 2: Create a new worker pool (no downtime)

  1. Duplicate your module with a new worker_pool_id

  2. Apply with the desired disk_size_gb setting

  3. Migrate stacks to the new worker pool via UI (Settings > Worker Pool) or Terraform provider

  4. Destroy the old pool after migration is complete

Alternative: Direct GCP troubleshooting

You can also troubleshoot disk space issues directly in GCP by following Google's documentation on troubleshooting disk full and resize.

For additional guidance on setting up worker pools, refer to the worker pools documentation.