Azure / Guide 10
Cost hygiene
Budgets, the monthly clean-up checklist, reservations and savings plans.
Most Azure waste comes from a handful of habits: resources nobody deleted, VMs running when nobody uses them, sizes chosen once and never revisited, and paying full price for steady workloads. This guide covers the checks and fixes that pay back quickly. The FinOps topic will cover the wider practice: showback, forecasting and working with finance.
See where the money goes
Cost Management + Billing in the portal is the starting point:
- Cost analysis: group by service, resource group, or tag (for example
CostCenter) to see who spends what. - Tag inheritance (Cost Management settings): applies resource group and subscription tags to cost records, so reports by tag are complete.
- Exports: a daily export to a storage account gives you the detailed data for Power BI or Excel.
Set budgets and alerts
A budget doesn't stop spending, but it tells people before the invoice does. Create one per subscription (or per resource group for big projects) with alerts at 80%, 100% and a forecast of 100%:
New-AzConsumptionBudget -Name 'budget-notes-test-monthly' -Amount 2000 -Category Cost `
-TimeGrain Monthly -StartDate (Get-Date -Day 1).Date `
-ContactEmail 'jane@ravindran.in' -NotificationKey 'Actual80' -NotificationThreshold 80 -NotificationEnabled
Forecast alerts are easiest to add in the portal (Cost Management > Budgets).
The monthly clean-up checklist
- Orphaned resources. Unattached disks, unused public IPs, detached NICs, empty resource groups and old snapshots.
Find-AzOrphanedResources.ps1lists them across every subscription. Unattached premium disks and Standard SKU public IPs are billed whether they're used or not. - Stopped but not deallocated VMs. They're still billed for compute. Check the
PowerStatecolumn inGet-AzVMInventory.ps1. - Non-production running 24/7. Schedule it with
Invoke-AzVMPowerSchedule.ps1. - Azure Advisor cost recommendations. Right-size or shut down underused VMs, and delete idle resources. Review them monthly; they refresh as usage changes.
- Untagged resources. Costs without an owner never get reviewed. Run
Get-AzUntaggedResources.ps1.
Pay less for what you keep
| Option | Best for | Commitment |
|---|---|---|
| Reservations | A specific VM family (or database, storage) running steadily in one region | 1 or 3 years, for that resource type |
| Azure savings plan for compute | Steady compute spend that moves between VM sizes, regions or services | 1 or 3 years, an hourly spend amount |
| Azure Hybrid Benefit | Windows Server and SQL Server licenses you already own with Software Assurance | Your existing licenses |
| Dev/Test pricing | Non-production subscriptions for Visual Studio subscribers | Dev/Test subscription offer |
| Spot VMs | Interruptible batch work | None; can be evicted at short notice |
Microsoft quotes discounts of up to about 72% for reservations and about 65% for savings plans compared with pay-as-you-go, depending on the service and term. The usual approach: right-size first, then cover the steady baseline with reservations or a savings plan, and leave the variable part on pay-as-you-go. Review utilisation monthly in Reservations and Savings plans.
Storage and logs
- Blob lifecycle management: move data to cool, cold and archive tiers automatically after a number of days, and delete it when it's no longer needed.
- Snapshots are easy to create and forget; set a retention rule.
- Log Analytics: check what's ingesting the most (see the monitoring guide). Verbose diagnostic logs can cost more than the resources they describe.
Make it routine
Put a 30-minute cost review in the calendar each month with the people who own the biggest subscriptions. Look at the trend, the top five resources, Advisor recommendations and the orphaned resources report. Small, regular clean-ups beat an annual cost-cutting project.