[ Web Proxy ]
URL:
Viewing: https://cloud.google.com/compute/docs/instance-groups/create-workload-policies [Back]  [Original]

Create workload policies for MIGs  |  Compute Engine  |  Google Cloud Documentation Skip to main content
Google Cloud Documentation [Google Cloud Documentation]
Send feedback

Create workload policies for MIGs Stay organized with collections Save and categorize content based on your preferences.

This document explains how to create workload policies for managed instance groups (MIGs) that have A4X Max, A4X, A4, A3 Ultra, A3 Mega, A3 High (8 GPUs), or H4D Compute Engine instances. To create a workload policy for multi-host TPU slices, see Create a MIG with multi-host TPU slice.

A workload policy lets you specify the placement or topology for the Compute Engine instances in your MIG. For example, you can use workload policies to place compute instances closer to each other, minimizing network latency for artificial intelligence (AI), machine learning (ML), or high performance computing (HPC) workloads. To learn more about the requirements and limitations that you apply when you create workload policies, see About workload policies.

Before you begin

Required roles

To get the permissions that you need to create and apply workload policies to MIGs, 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 create and apply workload policies to MIGs. To see the exact permissions that are required, expand the Required permissions section:

Required permissions

The following permissions are required to create and apply workload policies to MIGs:

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

Create a workload policy

To create a workload policy, use one of the following methods based on the machine series that the compute instances in your MIG use:

Create a workload policy for A4X Max or A4X instances

If you apply a workload policy to A4X Max or A4X instances in a MIG, then you must specify an accelerator topology value when you create your policy. This action helps your workloads achieve large-scale, non-blocking network performance.

To create a workload policy for A4X Max or A4X instances, select one of the following options:

gcloud

To create a workload policy for A4X Max or A4X instances, use the gcloud compute resource-policies create workload-policy command with the --accelerator-topology=1x72 flag:

gcloud compute resource-policies create workload-policy WORKLOAD_POLICY_NAME \
    --accelerator-topology=1x72 \
    --type=high-throughput \
    --region=REGION

Replace the following:

REST

To create a workload policy for A4X Max or A4X instances, make a POST request to the resourcePolicies.insert method. In the request body, include the acceleratorTopology field set to 1x72:

POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/resourcePolicies

{
  "name": "WORKLOAD_POLICY_NAME",
  "workloadPolicy": {
    "acceleratorTopology": "1x72",
    "type": "HIGH_THROUGHPUT"
  }
}

Replace the following:

Create a workload policy for A4, A3 Ultra, A3 Mega, A3 High (8 GPUs), or H4D instances

If you want to apply a workload policy to A4, A3 Ultra, A3 Mega, A3 High (8 GPUs), or H4D instances in a MIG, then we recommend that you specify a maximum topology distance value when you create your policy. This action helps ensure closer placement among your compute instances. However, the more compact the placement you specify, the fewer resources might be available in the zone where you want to create your compute instances.

To create a workload policy for A4, A3 Ultra, A3 Mega, or A3 High (8 GPUs) instances, select one of the following options:

gcloud

To create a workload policy, use the gcloud compute resource-policies create workload-policy command. Based on how close you want to place compute instances in a MIG, include the following flags in the command:

Replace the following:

REST

To create a workload policy, make a POST request to the resourcePolicies.insert method. Based on how close you want to place compute instances in a MIG, include the following fields in the request body:

Replace the following:

What's next

Send feedback

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-08-18 UTC.

Need to tell us more? [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-18 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page