- NAME
-
- gcloud compute resource-policies create group-placement - create a Compute Engine group placement resource policy
- SYNOPSIS
-
-
gcloud compute resource-policies create group-placementNAME[--accelerator-topology-mode=ACCELERATOR_TOPOLOGY_MODE] [--availability-domain-count=AVAILABILITY_DOMAIN_COUNT] [--collocation=COLLOCATION] [--description=DESCRIPTION] [--gpu-topology=GPU_TOPOLOGY] [--region=REGION] [--vm-count=VM_COUNT] [GCLOUD_WIDE_FLAG …]
-
- DESCRIPTION
- Create a Compute Engine Group Placement Resource Policy.
- EXAMPLES
- To create a Compute Engine group placement policy with two availability domains,
run:
gcloud compute resource-policies create group-placement my-resource-policy --region = REGION --availability-domain-count = 2 - POSITIONAL ARGUMENTS
-
-
NAME - Name of the resource policy to operate on.
-
- FLAGS
-
-
--accelerator-topology-mode=ACCELERATOR_TOPOLOGY_MODE - Defines the accelerator connection strategy for accelerator machine types like
TPUs.
ACCELERATOR_TOPOLOGY_MODEmust be one of:-
AUTO_CONNECT - This creates a static, pre-formed accelerator topology.
-
PROVISION_ONLY - The interconnected chips are connected on demand. At the time of VM creation, the chips are not connected.
-
-
--availability-domain-count=AVAILABILITY_DOMAIN_COUNT - Number of availability domain in the group placement policy.
-
--collocation=COLLOCATION - Collocation specifies whether to place VMs inside the sameavailability domain on
the same low-latency network.
COLLOCATIONmust be one of:-
collocated - Low network latency between more VMs placed on the same availability domain.
-
unspecified-collocation - Unspecified network latency between VMs placed on the same availability domain. This is the default behavior.
-
-
--description=DESCRIPTION - An optional, textual description for the backend.
-
--gpu-topology=GPU_TOPOLOGY - Specifies the shape of the GPU slice, in slice based GPU families eg. A4X.
-
--region=REGION - Region of the resource policy to operate on. If not specified, you might be
prompted to select a region (interactive mode only).
To avoid prompting when this flag is omitted, you can set the
property:compute/regiongcloud config set compute/region REGIONA list of regions can be fetched by running:
gcloud compute regions listTo unset the property, run:
gcloud config unset compute/regionAlternatively, the region can be stored in the environment variable
.CLOUDSDK_COMPUTE_REGION -
--vm-count=VM_COUNT - Number of instances targeted by the group placement policy. Google does not recommend that you use this flag unless you use a compact policy and you want your policy to work only if it contains this exact number of VMs.
-
- GCLOUD WIDE FLAGS
- These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$ gcloud helpfor details. - NOTES
- These variants are also available:
gcloud alpha compute resource-policies create group-placementgcloud beta compute resource-policies create group-placementgcloud preview compute resource-policies create group-placement
gcloud compute resource-policies create group-placement
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-05-27 UTC.

