Finding Azure Reserved Instance Scope Locks & Orphaned Managed Disks
Deleting an Azure Virtual Machine does not delete its OS/data Managed Disks, Static Public IPs, or Application Gateways by default. Compounding that orphan spend, Azure Reserved VM Instances scoped to a Single Subscription stop generating savings the moment production nodes migrate to a new landing-zone subscription.
Scope-Locked RI Delta$1,378.82/mo
38 Detached P30 SSDs$5,136.46/mo
Idle Gateways + IPs$1,125.66/mo
Total Monthly Waste$7,640.94
Worked Azure EA Amortized Export vs Active Telemetry Diff
Comparing Azure Cost Management exports across eastus2 and westeurope against active VM/NIC inventory (730-hour standard month) exposes four immediate cleanup targets:
| Resource Class | Count / Hours | Expected Active Cost | Actual Billed Cost | Recoverable Waste |
|---|---|---|---|---|
Standard_D8s_v5 (PAYG vs 1yr Shared RI) |
12 VMs × 730h (8,760h) | $1,985.02 ($0.2266/h) | $3,363.84 ($0.3840/h) | $1,378.82 |
Unattached P30 Premium SSD (1 TiB) |
38 disks × $135.17/mo | $0.00 | $5,136.46 | $5,136.46 |
| Orphaned Standard Static Public IPs | 14 IPs × $3.65/mo | $0.00 | $51.10 | $51.10 |
| Zero-Traffic App Gateway v2 Instances | 4 gateways × $268.64/mo | $0.00 | $1,074.56 | $1,074.56 |
| Monthly Recoverable Total | 68 Resource Lines | $1,985.02 | $9,625.96 | $7,640.94 |
Reproducible POST /api/v1/diff Request
{
"domain": "cloud_billing",
"baseline": "resource_type,units,unit_cost_usd\nStandard_D8s_v5_RI,8760,0.2266\nP30_Unattached_Disks,0,135.17\nOrphan_Public_IPs,0,3.65\nIdle_AppGateway_v2,0,268.64\n",
"actual": "resource_type,units,unit_cost_usd\nStandard_D8s_v5_RI,8760,0.3840\nP30_Unattached_Disks,38,135.17\nOrphan_Public_IPs,14,3.65\nIdle_AppGateway_v2,4,268.64\n"
}
Verified DiffProofReport Output
{
"ok": true,
"domain": "cloud_billing",
"summary": "Detected $7,640.94/mo in Azure RI scope mismatch and unattached disk/gateway orphan waste.",
"total_delta_usd": 7640.94,
"recoverable_overcharge_usd": 7640.94,
"severity": "high",
"line_item_findings": [
{ "id": "az-01", "category": "ri_scope_mismatch", "item": "Standard_D8s_v5_RI", "baseline_value": "$1,985.02", "actual_value": "$3,363.84", "delta_usd": 1378.82, "severity": "high", "claim_action": "Switch reservation scope from Single Subscription to Shared Enrollment scope" },
{ "id": "az-02", "category": "orphan_storage", "item": "P30_Unattached_Disks", "baseline_value": "$0.00", "actual_value": "$5,136.46", "delta_usd": 5136.46, "severity": "critical", "claim_action": "Snapshot and delete 38 disks where diskState == Unattached > 14 days" },
{ "id": "az-03", "category": "orphan_network", "item": "Orphan_Public_IPs", "baseline_value": "$0.00", "actual_value": "$51.10", "delta_usd": 51.10, "severity": "low", "claim_action": "Release 14 unassociated Standard static IPs" },
{ "id": "az-04", "category": "idle_gateway", "item": "Idle_AppGateway_v2", "baseline_value": "$0.00", "actual_value": "$1,074.56", "delta_usd": 1074.56, "severity": "medium", "claim_action": "Decommission 4 App Gateway v2 instances with 0 backend requests in 30d" }
],
"reproducible_counterexamples": [
{ "item": "Standard_D8s_v5_RI", "formula": "12 * 730 * (0.3840 - 0.2266)", "expected": 1985.02, "observed": 3363.84, "delta_usd": 1378.82 },
{ "item": "P30_Unattached_Disks", "formula": "38 * 135.17", "expected": 0.00, "observed": 5136.46, "delta_usd": 5136.46 }
],
"sha256_proof": "009d639b1b0503102f7e94f669f281ec540dc827057eb61d0b59f3bf06b9c7c1",
"cache_hit": false,
"verification": { "verified": true, "precision_usd": 0.01 },
"billed_micros": 80000
}
Operational Fix: Re-scoping an Azure RI from Single to Shared takes under 60 seconds in Azure Portal and costs $0 (no exchange quota consumed). Pair that with an automated Azure Resource Graph query (`where type == 'microsoft.compute/disks' and properties.diskState == 'Unattached'`) fed into
/api/v1/diff/batch every Monday.
Audit Azure Billing CSV Free Next: NAT Gateway Egress Diff · Agent Skill