Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent result while executing az vm list-skus #30626

Open
lukaszkucharski-tomtom opened this issue Jan 8, 2025 · 1 comment
Open

Inconsistent result while executing az vm list-skus #30626

lukaszkucharski-tomtom opened this issue Jan 8, 2025 · 1 comment
Assignees
Labels
Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team Compute az vm/vmss/image/disk/snapshot customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone

Comments

@lukaszkucharski-tomtom
Copy link

lukaszkucharski-tomtom commented Jan 8, 2025

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

@lukaszkucharski-tomtom lukaszkucharski-tomtom added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Jan 8, 2025
@yonzhan
Copy link
Collaborator

yonzhan commented Jan 8, 2025

Thank you for opening this issue, we will look into it.

@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. Compute az vm/vmss/image/disk/snapshot labels Jan 8, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jan 8, 2025
@yonzhan yonzhan removed the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Jan 8, 2025
@yonzhan yonzhan added this to the Backlog milestone Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team Compute az vm/vmss/image/disk/snapshot customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

4 participants