Skip to content

Part 7: Cost Management & Budgets

Source: John Savill's Azure Master Class v3 - Part 3: Governance
Video Timestamps: 1:32:00 - 1:51:00
AZ-104 Relevance: ⭐⭐⭐⭐ HIGH - Budgets and cost analysis questions


Cost Management Overview

Access: Portal → Cost Management + Billing


Cost Analysis

Views

ViewShows
Accumulated costsRunning total over time
Daily costsPer-day breakdown
Cost by resourceWhich resources cost most
Cost by serviceWhich services cost most
Cost by tagGroup by your tags

Grouping & Filtering

Group costs by:

  • Resource group
  • Resource type
  • Location
  • Tag
  • Subscription

Filter to narrow down specific areas.

Smart Views (Saved Views)

Save commonly used views for quick access:

  • Team A's monthly costs
  • Production environment costs
  • Dev/Test spending

Budgets

Budgets are alerts, not hard limits. They don't stop spending.

Creating a Budget

  1. Scope: Where (Subscription, RG, etc.)
  2. Amount: Dollar value
  3. Reset period: Monthly, Quarterly, Annually
  4. Alerts: At what % to notify

Alert Thresholds

TypeTriggers When
ActualSpent amount reaches threshold
ForecastProjected spending will exceed

Alert Actions

When threshold hit:

  • Email notification
  • Action Group (webhook, function, logic app)

Important: Budgets do NOT stop resources. They only alert!


Cost Allocation

The Tag Problem

Tags don't inherit. How do you track costs across resources?

Tag Inheritance for Billing

Portal → Cost Management → Cost allocation (Preview)

Options:

  1. Inherit from subscription - Resources get subscription's tags for billing
  2. Inherit from resource group - Resources get RG's tags for billing

This is for billing purposes only - doesn't change actual resource tags.

Cost Allocation Rules

For shared resources (like a log analytics workspace):

  1. Create allocation rule
  2. Define source (shared resource)
  3. Define targets (distribute to subscriptions/RGs)
  4. Choose split method (equal, proportional, fixed %)

Exports

Schedule automatic export of cost data:

SettingOptions
FrequencyDaily, Weekly, Monthly
FormatCSV
DestinationStorage Account
ContentAmortized, Actual, Usage

Use for:

  • Building custom dashboards
  • Power BI reports
  • Long-term storage/analysis

Invoice & Billing

Invoices

Portal → Cost Management + Billing → Invoices

  • View current and past invoices
  • Download PDF
  • See billing period breakdown

Billing Scopes

ScopeDescription
Billing accountTop level (EA, MCA, etc.)
Billing profileInvoice recipient
Invoice sectionGrouping on invoice
SubscriptionIndividual sub

Cost Visibility at Different Scopes

ScopeWhat You See
Management GroupAll subscriptions below
SubscriptionAll RGs in that sub
Resource GroupAll resources in that RG

Costs aggregate UP the hierarchy (unlike RBAC/Policy which goes DOWN).


Tips for Cost Control

StrategyImplementation
Tag everythingCostCenter, Environment, Owner
Budget alertsSet at subscription level
Review regularlyWeekly cost analysis
Use reserved instancesFor predictable workloads
Right-size resourcesAzure Advisor recommendations
Auto-shutdownDev/Test VMs

Mental Model

Budget = Speedometer Warning 🚗

  • Dashboard shows your speed (spending)
  • Warning light at 80% (alert)
  • Doesn't hit the brakes for you
  • YOU must take action

Cost Allocation = Splitting the Bill 🧾

  • Shared resource (like shared appetizer)
  • Split cost fairly across teams
  • Everyone sees their portion

AZ-104 Exam Tips

TopicKey Point
BudgetsAlert only, don't stop spending
Forecast alertsPredict overspend before it happens
Tag inheritanceAvailable for billing, not actual resources
Cost allocationFor shared resources
Cost flowsAggregates UP (vs RBAC/Policy DOWN)
ExportTo storage account, CSV format

Practical Exercises

Exercise 1: Explore Cost Analysis (5 min)

  1. Portal → Cost ManagementCost analysis
  2. Change view to "Cost by resource"
  3. Try grouping by Tag
  4. Save as a custom view

Exercise 2: Create a Budget (5 min)

  1. Portal → Cost ManagementBudgets
  2. Add a budget for your subscription
  3. Set a small amount (e.g., $10)
  4. Add alert at 50% and 80%
  5. Add your email for notifications

Exercise 3: Review Billing (3 min)

  1. Portal → Cost Management + BillingInvoices
  2. View current billing period
  3. Note the invoice sections and totals

End of Part 7

Released under the MIT License.