- NAME
-
- gcloud compute resource-policies create workload-policy - create a Compute Engine workload resource policy
- SYNOPSIS
-
-
gcloud compute resource-policies create workload-policyNAME--type=TYPE[--accelerator-topology-mode=ACCELERATOR_TOPOLOGY_MODE] [--description=DESCRIPTION] [--region=REGION] [--accelerator-topology=ACCELERATOR_TOPOLOGY|--max-topology-distance=MAX_TOPOLOGY_DISTANCE] [GCLOUD_WIDE_FLAG …]
-
- DESCRIPTION
- Create a Compute Engine workload resource policy.
- EXAMPLES
- To create a workload policy:
gcloud compute resource-policies create workload-policy NAME --type = TYPE - POSITIONAL ARGUMENTS
-
-
NAME - Name of the resource policy to operate on.
-
- REQUIRED FLAGS
-
-
--type=TYPE - Type of the workload policy defining the high-level intent of the cluster.
TYPEmust be one of:-
HIGH_AVAILABILITY - For workloads that aim to be highly available. Common examples are web / ML serving, or distributed database clusters. Compute Engine spreads VMs at best-effort to improve reliability of the distributed infrastructure.
-
HIGH_THROUGHPUT - For high throughput distributed workloads eg. HPC or ML training. Compute Engine collocates VMs at best-effort to reduce network latency between VMs.
-
-
- OPTIONAL 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.
-
-
--description=DESCRIPTION - An optional, textual description for the backend.
-
--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 - At most one of these can be specified:
-
--accelerator-topology=ACCELERATOR_TOPOLOGY - Specifies the topology of placement and interconnection performance required to create a slice of VMs with interconnected accelerators.
-
--max-topology-distance=MAX_TOPOLOGY_DISTANCE - Specifies the topology of placement and interconnection network performance of
the group of VMs (MIG / Multi-MIGs).
MAX_TOPOLOGY_DISTANCEmust be one of:-
BLOCK - VMs are placed within the same block of capacity with improved latency compared to Cluster.
-
CLUSTER - VMs are placed within the same cluster of capacity with improved latency between them.
-
SUBBLOCK - Tightest collocation of VMs that provides minimized network latency. VMs are placed within the same rack of capacity with improved latency compared to Block.
-
-
-
- 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 workload-policygcloud beta compute resource-policies create workload-policygcloud preview compute resource-policies create workload-policy
gcloud compute resource-policies create workload-policy
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.

