Tags, Cost Management & Azure Advisor
Tags organise your resources for billing and management. Cost Management tracks spending. Azure Advisor gives optimisation recommendations. Together, they help you keep Azure costs under control and your environment healthy.
Resource tags
Tags are sticky labels you put on Azure resources to organise them.
Imagine you have 200 resources across multiple subscriptions. Some belong to Marketing, some to Finance, some are production, some are test. Tags let you label each resource: Department: Marketing, Environment: Production, CostCenter: CC1234.
Then you can filter, search, and generate cost reports by tag. “How much did the Marketing department spend last month?” → filter by tag. “Which resources are test and can be shut down?” → filter by Environment tag.
Tag rules and limits
| Rule | Detail |
|---|---|
| Max tags per resource | 50 name-value pairs |
| Tag name max length | 512 characters |
| Tag value max length | 256 characters |
| Inheritance | Tags are NOT inherited (use Policy to enforce) |
| Tag names | Case-insensitive for operations, case-preserving |
| Tag values | Case-sensitive |
| Apply to | Resources, resource groups, subscriptions |
Exam tip: Tags are NOT inherited
This is a classic exam trap. Putting a tag on a resource group does NOT automatically tag the resources inside. If you need all resources in a group to have a specific tag, use Azure Policy with a Modify or Append effect to enforce tag inheritance.
For example, the built-in policy “Inherit a tag from the resource group if missing” automatically copies a specified tag from the parent resource group to new resources.
Enforcing tags with Azure Policy
Common tag policies (all built-in — no need to write custom JSON):
| Policy | Effect | What It Does |
|---|---|---|
| Require a tag on resources | Deny | Blocks resource creation if a specified tag is missing |
| Require a tag on resource groups | Deny | Blocks RG creation without required tags |
| Inherit a tag from the resource group | Modify | Copies a tag from the RG to new resources |
| Inherit a tag from the subscription | Modify | Copies a tag from the subscription to new RGs |
| Append a tag and its value | Append | Adds a default tag if not present |
Real-world: TechCorp's tagging strategy
TechCorp Solutions uses these mandatory tags across all resources:
Environment— Production, Staging, Development, TestCostCenter— maps to finance department codesOwner— email of the responsible personProject— project name for cost allocation
Alex configured a Deny policy requiring CostCenter and Environment tags on all new resources. A Modify policy inherits the Owner tag from the resource group. Within a month, their cost reports went from “which subscription spent what?” to “which project in which department spent what?”
Azure Cost Management
Azure Cost Management is built into the Azure portal and helps you track, analyse, and optimise cloud spending.
Key features:
- Cost analysis — visualise costs by resource, resource group, tag, region, service
- Budgets — set spending limits with alerts at thresholds (e.g., alert at 80%, 100%)
- Alerts — email notifications when spending approaches or exceeds budgets
- Recommendations — optimisation suggestions (powered by Azure Advisor)
- Exports — schedule cost data exports to storage accounts for external analysis
Budgets and alerts
Budgets are the primary tool for cost governance:
- Create a budget — set a monthly or quarterly amount (e.g., $5,000/month)
- Set alert thresholds — trigger at percentage or actual amount (e.g., 50%, 80%, 100%)
- Configure actions — email notifications, action groups, or even automated shutdown
| Budget Setting | What It Controls |
|---|---|
| Scope | Subscription, resource group, or management group |
| Amount | The spending target (e.g., $5,000/month) |
| Reset period | Monthly, quarterly, annually |
| Alert threshold | Percentage or actual cost at which to trigger |
| Alert recipients | Email addresses or action groups |
Important: Budgets are alerts only — they do NOT automatically stop resources from being created or running when the budget is exceeded. For hard limits, you’d need automation via action groups or Azure Functions.
Exam tip: Budgets don't automatically stop spending
A very common misconception: setting a $1,000 budget does NOT cap spending at $1,000. It sends alerts. Resources continue running and incurring costs. To actually stop spending, you’d need to configure an action group that triggers an Azure Function or Logic App to shut down resources.
Azure Advisor
Azure Advisor is a personalised recommendation engine that analyses your resource configuration and usage patterns.
Advisor recommendation categories:
| Category | What It Recommends | Example |
|---|---|---|
| Cost | Reduce spending | ”Resize VM from D8 to D4 — it’s using only 20% CPU” |
| Security | Improve security posture | ”Enable MFA for all admin accounts” |
| Reliability | Improve availability | ”Add a second VM to your availability set” |
| Operational Excellence | Improve management | ”Enable diagnostic logs on your SQL database” |
| Performance | Improve speed | ”Move your storage to the same region as your app” |
Real-world: CloudFirst Labs saves money with Advisor
CloudFirst Labs was spending $8,000/month on Azure. Alex checked Advisor’s cost recommendations and found:
- 3 VMs were oversized (40% CPU average) → right-sizing saved $1,200/month
- 5 unattached managed disks from deleted VMs → deleting them saved $150/month
- Reserved Instances for their 2 always-on databases → saved $800/month
Total savings: $2,150/month (27% reduction) just from following Advisor recommendations. Now Alex checks Advisor weekly as part of his routine.
Knowledge check
TechCorp Solutions wants all resources in their Production subscription to have a 'CostCenter' tag. New resources without this tag should be blocked. What should Alex configure?
CloudFirst Labs set a $5,000 monthly budget with an alert at 80%. They've now spent $4,500. What happened?
Azure Advisor recommends that Meridian Financial resize a VM from Standard_D8s_v3 to Standard_D4s_v3. What category does this recommendation fall under?
🎬 Video coming soon