gcloud compute instances bulk create accepts instance flexibility and min CPU platform settings
Introduced 2026-09-29 · score 0.90
HOW TO USE IT
To create bulk Compute Engine instances with selected machine types and a minimum CPU platform, use the beta bulk-create command with `--instance-selection` or `--instance-flexibility-policy`.
gcloud beta compute instances bulk create --name-pattern=<name-pattern> --count=<count> --region=<region> --instance-selection="name=<selection-name>,machine-type=<machine-type>,min-cpu-platform=<platform>"gcloud beta compute instances bulk create --name-pattern=<name-pattern> --count=<count> --region=<region> --instance-flexibility-policy='{"instanceSelections":{"<selection-name>":{"rank":<rank>,"machineTypes":["<machine-type>"],"minCpuPlatform":"<platform>"}}}'WHY THIS HELPS
Specify instance flexibility and a minimum CPU platform when bulk creating Compute Engine instances.
REQUIREMENTS AND LIMITATIONS
- Availability: beta
- --name-pattern (required): Pattern for instance names; alternatively provide `--predefined-names`.
- --count: Number of instances to create; when omitted with predefined names, uses the number of names provided.
- --region (required): Region for bulk creation; alternatively specify `--zone`.
- --instance-selection: Named machine-type selection; repeat the flag for each selection. This form supports minimum CPU platform overrides but not disks.
- name (required): Name for the selection.
- machine-type (required): Machine type in the selection; the flag syntax allows repeated machine-type values.
- rank: Optional rank for the named selection.
- min-cpu-platform: Minimum CPU platform override for the selection.
- --instance-flexibility-policy: JSON policy containing named selections; may specify additional overrides such as minimum CPU platform and disks. Mutually exclusive with `--instance-selection` and `--instance-selection-machine-types`.
- instanceSelections (required): Object mapping selection names to selection configurations.
- rank: Optional selection rank in the flexibility policy.
- machineTypes (required): Array of machine types for the selection.
- minCpuPlatform: Minimum CPU platform for the selection.
- disks: Disk overrides for the selection; the docs example uses entries with `deviceName` and `boot`.
- deviceName: Disk device name in the documented flexibility-policy example.
- boot: Whether the documented policy disk is a boot disk.
FIRST-PARTY EVIDENCE
- https://docs.cloud.google.com/sdk/docs/release-notes#58700_2026-09-29
- https://docs.cloud.google.com/sdk/gcloud/reference/compute/instances/bulk/create
Check the installed version and the source before using it. Entry JSON