Modify a high availability controller

After you create a high availability controller, you can modify its description or initiation method for failovers at any time. To change any other property in a high availability controller, you must delete and recreate the controller. Because Compute Engine blocks update requests while a managed virtual machine (VM) instance runs, you must stop the VM before you update its properties.

This document explains how to modify a high availability controller. For more information about the requirements and limitations that apply when you manage high availability controllers, see About high availability controllers.

Before you begin

  • If you haven't already, set up authentication. Authentication verifies your identity for access to Google Cloud services and APIs. To run code or samples from a local development environment, you can authenticate to Compute Engine by selecting one of the following options:

    Select the tab for how you plan to use the samples on this page:

    gcloud

    1. Install the Google Cloud CLI. After installation, initialize the Google Cloud CLI by running the following command:

      gcloud init

      If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.

    2. Set a default region and zone.

    REST

    To use the REST API samples on this page in a local development environment, you use the credentials you provide to the gcloud CLI.

      Install the Google Cloud CLI.

      If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.

    For more information, see Authenticate for using REST in the Google Cloud authentication documentation.

Required roles

To get the permissions that you need to modify a high availability controller, ask your administrator to grant you the Compute Instance Admin (v1) (roles/compute.instanceAdmin.v1) IAM role on the project. For more information about granting roles, see Manage access to projects, folders, and organizations.

This predefined role contains the permissions required to modify a high availability controller. To see the exact permissions that are required, expand the Required permissions section:

Required permissions

The following permissions are required to modify a high availability controller:

  • To modify the description or initiation method for failovers for a high availability controller: compute.haControllers.update

You might also be able to get these permissions with custom roles or other predefined roles.

Modify a high availability controller

To modify the description, the initiation method for failovers, or both properties in an existing high availability controller, select one of the following options:

gcloud

To modify the description, the initiation method for failovers, or both properties in an existing high availability controller, use the gcloud preview compute ha-controllers update command with one of the following flags:

  • To modify the description for your high availability controller, include the --description flag:

    gcloud preview compute ha-controllers update HA_CONTROLLER_NAME \
        --region=REGION \
        --description="DESCRIPTION"
    
  • To modify the initiation method for failovers for your high availability controller, include the --failover-initiation flag:

    gcloud preview compute ha-controllers update HA_CONTROLLER_NAME \
        --region=REGION \
        --failover-initiation=FAILOVER_INITIATION
    

Replace the following:

  • HA_CONTROLLER_NAME: the name of the high availability controller that you want to modify.

  • REGION: the region where the high availability controller exists.

  • DESCRIPTION: an updated description for the high availability controller.

  • FAILOVER_INITIATION: how the high availability controller triggers a failover. Specify one of the following values:

    • To trigger failovers when a zonal outage occurs, the VM remains in the REPAIRING state for over 10 minutes, or you request a failover: automatic

    • To trigger failovers only when you request them: manual-only

REST

To modify the description, the initiation method for failovers, or both properties in an existing high availability controller, make a PATCH request to the preview haControllers.patch method with the $apiVersion=2026-10-01-preview query parameter in the request URL. In the request body, include one of the following fields:

  • To modify the description for your high availability controller, include the updateMask=description query parameter in the request URL and the description field in the request body:

    PATCH https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/haControllers/HA_CONTROLLER_NAME?updateMask=description&$apiVersion=2026-10-01-preview
    
    {
      "name": "HA_CONTROLLER_NAME",
      "description": "DESCRIPTION"
    }
    
  • To modify the initiation method for failovers for your high availability controller, include the updateMask=failoverInitiation query parameter in the request URL and the failoverInitiation field in the request body:

    PATCH https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/haControllers/HA_CONTROLLER_NAME?updateMask=failoverInitiation&$apiVersion=2026-10-01-preview
    
    {
      "name": "HA_CONTROLLER_NAME",
      "failoverInitiation": "FAILOVER_INITIATION"
    }
    

Replace the following:

  • PROJECT_ID: the ID of your project.

  • REGION: the region where the high availability controller exists.

  • HA_CONTROLLER_NAME: the name of the high availability controller that you want to modify.

  • DESCRIPTION: an updated description for the high availability controller.

  • FAILOVER_INITIATION: how the high availability controller triggers a failover. Specify one of the following values:

    • To trigger failovers when a zonal outage occurs, the VM remains in the REPAIRING state for over 10 minutes, or you request a failover: AUTOMATIC

    • To trigger failovers only when you request them: MANUAL_ONLY

What's next

Try it for yourself

If you're new to Google Cloud, create an account to evaluate how Compute Engine performs in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.

Try Compute Engine free