az vm list-skus filtering out VM sizes that are available regionally when they are restricted in all zones #23341
Labels
Auto-Assign
Auto assign by bot
Azure CLI Team
The command of the issue is owned by Azure CLI team
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
Compute
az vm/vmss/image/disk/snapshot
Milestone
Related command
az vm list-skus
Describe the bug
The current logic for "vm list-skus" is filtering out VM sizes that are available regionally when they are restricted in all zones. Relevant code line is this
azure-cli/src/azure-cli/azure/cli/command_modules/vm/custom.py
Line 1285 in b475906
This does not appear to be correct behavior, since a VM size maybe restricted for all 3 zones "zonally" but still be available for a subscription when deployed "regionally".
To Reproduce
Execute "az vm list-skus" on an Azure subscription that has some VM sizes that are restricted zonally in all 3 zones but are not restricted regionally. Review the output to see that the VMs sizes are not listed.
As expected, all VM sizes are returned when using the
--all
parameter, but the available sizes should also be returned without using--all
if these sizes are not restricted regionally as well as zonally.Expected behavior
VM sizes that are available for a subscription, either regionally or zonally, should be returned by the "az vm list-skus" command even without including the
--all
parameter.The text was updated successfully, but these errors were encountered: