3.3 Using Tags for Cost Management and Organization
Key Takeaways
- Azure resource tags are key-value metadata pairs used to organize resources for cost tracking, automation, and governance.
- Common tagging strategies include tagging by environment (prod/dev), cost center, project, owner, and compliance classification.
- Cost Management supports filtering and grouping cost reports by tags, enabling department-level and project-level cost tracking.
- Tags are NOT inherited from parent resources — use Azure Policy to enforce tagging rules at scale.
- A consistent tagging strategy is one of the most impactful cost management practices in Azure.
Using Tags for Cost Management and Organization
Quick Answer: Tags are key-value pairs attached to Azure resources for organization. Use tags to track costs by department, project, environment, or owner. Tags are NOT inherited — enforce tagging with Azure Policy.
Why Tags Matter for Cost Management
Without tags, Azure Cost Management shows spending by resource type, resource group, and subscription. With a consistent tagging strategy, you can also view spending by:
- Department — How much is Marketing spending vs. Engineering?
- Project — How much does Project Alpha cost per month?
- Environment — How much more does production cost than development?
- Owner — Who owns the most expensive resources?
- Cost Center — Which cost center should be charged?
Recommended Tagging Strategy
| Tag Name | Example Values | Purpose |
|---|---|---|
| Environment | Production, Staging, Development, Test | Identify lifecycle stage |
| CostCenter | CC-1001, CC-2002, CC-3003 | Financial allocation |
| Owner | jane@company.com | Resource accountability |
| Project | ProjectAlpha, ProjectBeta | Project-level cost tracking |
| Department | Engineering, Marketing, Finance | Department-level reporting |
| ManagedBy | Terraform, Manual, ARM | Track deployment method |
| DataClassification | Public, Internal, Confidential, Restricted | Compliance labeling |
| AutoShutdown | Yes, No | Automation trigger |
Enforcing Tags with Azure Policy
Since tags are not automatically inherited, use Azure Policy to ensure consistent tagging:
| Policy | Effect | Description |
|---|---|---|
| Require tag on resources | Deny | Block creation of resources without required tags |
| Require tag on resource groups | Deny | Block creation of resource groups without required tags |
| Inherit tag from resource group | Modify | Automatically copy tags from resource group to new resources |
| Add or replace tag on resources | Modify | Add a specific tag to all resources |
Cost Reports by Tag
In Azure Cost Management, you can:
- Filter — Show only resources with a specific tag (e.g., "Department = Engineering")
- Group — Group costs by tag name to compare (e.g., group by "Project" to see per-project spend)
- Budget alerts — Create budgets scoped to tagged resources
- Export — Export tagged cost data for external reporting
On the Exam: Tags enable granular cost tracking that subscriptions and resource groups alone cannot provide. Remember: tags are NOT inherited, max 50 tags per resource, and tag names are case-sensitive.
What is the maximum number of tags that can be applied to a single Azure resource?
A company wants to track Azure costs by department. Which approach should they use?