-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Closed
Labels
Auto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamComputeaz vm/vmss/image/disk/snapshotaz vm/vmss/image/disk/snapshotbugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.
Milestone
Description
Describe the bug
We use terraform to provision our infrastructure in Azure.
Because of limits related with available VM types in different zones we check before deployment VM availability.
To check actual list of zones where VM is available we use command az vm list-skus. Then we pass returned list of zones as input variable to the terraform.
Unfortunately sometimes even if we get a response like:
[
{
"name": "Standard_E32as_v4",
"zones": [
"3",
"1",
"2"
]
},
{
"name": "Standard_E32as_v5",
"zones": [
"3",
"1",
"2"
]
},
{
"name": "Standard_E32as_v6",
"zones": [
"2"
]
}
]our deployment fails because error like: "The VM size of Standard_E32as_v5 is only allowed in zones [2] in your subscription in location 'westeurope'. "
Looks like terraform takes list of zones for v6 instead of v5 or az cli command returns incorrect values in a list!
Related command
az vm list-skus --subscription "xxxxxxxx-xxxx-yyyy-zzzz-aabbccddeedd" --location "westeurope" --resource-type virtualMachines --zone --size Standard_E32as_v --query '[].{name: name, zones: locationInfo[0].zones}'
Errors
Error: creating Agent Pool (Subscription: "xxxxxxxx-xxxx-yyyy-zzzz-aabbccddeedd"
Resource Group Name: "rg-xxxx-westeurope-prod-12345"
Managed Cluster Name: "aks-xxx-weu-prod-12345"
Agent Pool Name: "ee1234s05ac7"): performing CreateOrUpdate: unexpected status 400 (400 Bad Request) with response: {
"code": "BadRequest",
"details": null,
"message": "The VM size of Standard_E32as_v5 is only allowed in zones [2] in your subscription in location 'westeurope'. ",
"subcode": ""
}
Issue script & Debug output
none
Expected behavior
I'd like to get a real list of zones where VM is available!
Environment Summary
azure-cli 2.67.0
core 2.67.0
telemetry 1.1.0
Extensions:
account 0.2.5
Dependencies:
msal 1.31.0
azure-mgmt-resource 23.1.1
Python location '/opt/homebrew/Cellar/azure-cli/2.67.0/libexec/bin/python'
Extensions directory '/Users/username/.azure/cliextensions'
Python (Darwin) 3.12.7 (main, Oct 1 2024, 02:05:46) [Clang 16.0.0 (clang-1600.0.26.3)]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.Additional context
No response
Metadata
Metadata
Assignees
Labels
Auto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamComputeaz vm/vmss/image/disk/snapshotaz vm/vmss/image/disk/snapshotbugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.