{
  "slug": "az-vmss-create-supports-automatic-availability-zone-placement-controls-b825223d1bb4",
  "title": "az vmss create supports automatic availability-zone placement controls",
  "tools": [
    "az"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-04-07T00:00:00.000Z",
  "announced_at": "2026-04-07T00:00:00.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When creating a VM scale set with automatic zone placement, set `--zone-placement-policy Auto`; optionally constrain eligible zones or their maximum count. `--include-zones` and `--exclude-zones` cannot be used together.",
    "examples": [
      "az vmss create --resource-group <resource-group> --name <scale-set-name> --image Ubuntu2204 --admin-username azureuser --generate-ssh-keys --instance-count 3 --zone-placement-policy Auto",
      "az vmss create --resource-group <resource-group> --name <scale-set-name> --image Ubuntu2204 --admin-username azureuser --generate-ssh-keys --instance-count 3 --zone-placement-policy Auto --include-zones 1 2"
    ],
    "gotchas": [
      "Version: 2.85.0",
      "--resource-group (required): Name of an existing resource group.",
      "--name (required): Scale set name.",
      "--image (required): OS image name, URN, custom image name or ID, or VHD blob URI; required unless using `--attach-os-disk`.",
      "--zone-placement-policy: Set to `Auto` to enable automatic availability-zone placement.",
      "--include-zones: Availability zones to consider; if omitted, all regional zones are considered. Mutually exclusive with `--exclude-zones`.",
      "--exclude-zones: Availability zones to exclude; if omitted, no zones are excluded. Mutually exclusive with `--include-zones`.",
      "--max-zone-count: Maximum number of availability zones to use with automatic placement; if omitted, all available regional zones may be used.",
      "--admin-username (required): Administrator username for the example Linux VM.",
      "--generate-ssh-keys: Generate SSH key files if missing; stores them in `~/.ssh`.",
      "--instance-count: Number of VMs in the scale set; default is 2.",
      "Prerequisite: Register the `Microsoft.Compute/VmssAutomaticZonePlacement` feature for the subscription. The feature is marked Preview in the official documentation.",
      "Prerequisite: The resource group must already exist.",
      "`--include-zones`, `--exclude-zones`, and `--max-zone-count` apply when `--zone-placement-policy` is set to `Auto`.",
      "Docs conflict: `--include-zones` and `--exclude-zones` cannot both be configured on the same scale set; the card's optional-flag wording could be read as allowing both together."
    ]
  },
  "why_it_matters": "Create a VM scale set with automatic zone placement constrained by selected zones and a zone count.",
  "sources": [
    "https://learn.microsoft.com/en-us/cli/azure/release-notes-azure-cli#april-07-2026",
    "https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-automatic-zone-placement",
    "https://learn.microsoft.com/en-us/cli/azure/vmss"
  ],
  "rank": 0.94028,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2b-20261017",
    "verdict_id": "wave2b-20261017:wave2b-20261017-5d297ca562c60733-16:gate",
    "evidence_hash": "0b743bc5c5a427a5564c9459e73c34c14aae1571759a1bb7fcf2517f24ba9298"
  },
  "review": {
    "draft_hash": "404db5ba38faa429cc2b048bdd280c77c3e9d86811b4de44185cce4e6142e39e",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2b-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.94 >= 0.9; 2 needed) and Jev gave 0.71 (>= 0.6 needed)."
  }
}
