feat: add filtering for VM SKUs based on location and remove family field from VmSkuRow

This commit is contained in:
2026-04-20 23:20:44 +02:00
parent 778a74c49a
commit 86d9a3d014
3 changed files with 20 additions and 10 deletions

View File

@@ -124,9 +124,10 @@ export class AzureImageService {
}
const targetLocation = location.toLowerCase();
const filter = `location eq '${location}'`;
const vmSkus: VmSkuOption[] = [];
for await (const sku of this.computeClient.resourceSkus.list()) {
for await (const sku of this.computeClient.resourceSkus.list({ filter })) {
if ((sku.resourceType ?? "").toLowerCase() !== "virtualmachines") {
continue;
}