Skip to content

Azure Resource Graph: emit fields needed for full downstream cost-discovery E2E (disk IOPS/throughput, SQL DB databases, AKS agent-pool attrs, VMSS) #323

Description

@NitinKumar004

Context

A downstream project drives its real Azure discoverer (real armresourcegraph SDK) against cloudemu's Resource Graph endpoint to E2E-verify cost calculation. PR #316 (feat/315-arg-resource-fields) added the properties/sku projection, which unblocked disk diskSizeGB+sku.name, VM SKU, and SQL MI storageSizeInGB. 🎉

To cover the remaining cost cases, the Azure ARG emulation needs to be able to carry a few more properties.* fields. Today they can't be seeded because the per-type walkers don't populate them (the properties bag is open in type but closed in population).

Requested fields (each is a real Azure ARG property a discoverer reads)

1. Managed disk — provisioned IOPS / throughput

  • properties.diskIOPSReadWrite, properties.diskMBpsReadWrite
  • The wire walker (services/resourcediscovery/walkers.go walkVolumes) already projects putInt("diskIOPSReadWrite", v.IOPS) / ("diskMBpsReadWrite", v.Throughput) — but VolumeConfig (the CreateVolume input, services/compute/driver/driver.go) has no IOPS/Throughput fields, so they're always 0 and dropped. Needed to price Premium SSD v2 / Ultra disks (capacity + IOPS + throughput).
  • Fix: add IOPS, Throughput to VolumeConfig and carry them into the volume model.

2. SQL Managed Instance — storageAccountType

  • properties.storageAccountType (backup redundancy: GeoRedundant/ZoneRedundant/…). storageSizeInGB already works via ManagedInstanceConfig.StorageGB. Add StorageAccountType to the MI config + projection.

3. SQL Database (microsoft.sql/servers/databases) — not discovered at all

  • No walker enumerates individual databases (only logical servers / flex / MI). Needed: properties.zoneRedundant (bool), properties.currentSku, sku.name.
  • Fix: a servers/databases walker + portableToAzureTypeMap entry.

4. AKS agent pool — sku + properties

  • The NodeGroup resource is typed to .../agentpools but walkKubernetes emits only ID/ARN/Region (no applyAttrs). Needed: properties.scaleSetPriority (Spot detection), properties.count, sku.

5. VMSS (microsoft.compute/virtualmachinescalesets) — not discoverable

  • No VMSS walker / type mapping exists. Needed: properties.virtualMachineProfile.priority + .licenseType + .storageProfile.osDisk.osType, and sku.capacity. (Nested virtualMachineProfile object.)

Why

Without these, the downstream E2E can verify disk-size/SKU + SQL-MI-storage end-to-end, but cannot exercise: disk IOPS/throughput pricing, SQL DB zone-redundancy, AKS Spot node-pool pricing, or VMSS Spot/Hybrid-Benefit pricing — those fall back to unit tests that feed hand-authored ARG JSON.

Happy to contribute PRs for any of these if the direction is agreed. Extends the intent of #315/#316.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions