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 Cloud de Confiance by S3NS 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
-
Install the Google Cloud CLI, and then sign in to the gcloud CLI with your federated identity. After signing in, initialize the Google Cloud CLI by running the following command:
gcloud init - 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, and then sign in to the gcloud CLI with your federated identity.
For more information, see Authenticate for using REST in the Cloud de Confiance 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
--descriptionflag: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-initiationflag: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
REPAIRINGstate for over 10 minutes, or you request a failover:automaticTo 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=descriptionquery parameter in the request URL and thedescriptionfield in the request body:PATCH https://compute.s3nsapis.fr/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=failoverInitiationquery parameter in the request URL and thefailoverInitiationfield in the request body:PATCH https://compute.s3nsapis.fr/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
REPAIRINGstate for over 10 minutes, or you request a failover:AUTOMATICTo trigger failovers only when you request them:
MANUAL_ONLY