Skip to content

[VMSS Automatic Zone Placement] - Documentation update to clarify that both --include-zones and --exclude-zones cannot be added at the same time #33473

@hilaryw29

Description

@hilaryw29

Preconditions

  • No need to upgrade Python SDK or the Python SDK is ready.

Related command

az vmss create link

  • Relevant parameters: --include-zones, --exclude-zones (used with --zone-placement-policy Auto).

Resource Provider

Microsoft.Compute/virtualMachineScaleSets

Description of Feature or Work Requested

When --zone-placement-policy Auto is used, the CLI exposes two zone-filter parameters: --include-zones (maps to placement.includeZones) and --exclude-zones (maps to placement.excludeZones). On VMSS, these two parameters are mutually exclusive and VMSS will reject requests that set both, returning "BadRequest: Both 'placement.includeZones' and 'placement.excludeZones' cannot be set".

Today CLI does not validate this; it passes both to ARM and the user only finds out after a failed deployment with a service-side error.

Request:

  • [Required] update the --include-zones/--exclude-zones documentation in az vmss create to note that they cannot be combined.
  • [Optional / nice to have] add a client-side validator that rejects --include-zones + --exclude-zones together

Minimum API Version Required

2024-07-01

Swagger PR link / SDK link

N/A -- documentation change only.

Request Example

No response

Target Date

2026-07-31

PM Contact

hilarywang

Engineer Contact

raredd, frankpang

Additional context

No response

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions