Skip to main content
Azure Resource Tags In this article you’ll learn what Azure resource tags are, why they matter, and how to manage them in the Azure portal and via command line. Tags are a lightweight, customizable metadata mechanism that help you identify, organize, automate, and report on resources across subscriptions and resource groups — which is essential for governance and cost management in medium-to-large Azure estates. Why use tags?
  • Identification and ownership — Attach owner: Sam to identify the person responsible for a VM.
  • Environment classification — Use environment: production or environment: dev to separate workloads.
  • Logical grouping — Group resources for a project across resource groups and subscriptions.
  • Cost allocation — Tag with cost-center or project-code to attribute costs accurately in billing reports.
Key behaviors
  • Tags are name-value pairs (for example, department: HR).
  • Tags can be applied at the subscription, resource group, and resource level.
  • Billing and detailed cost reporting are always tied to resources, so resource-level tags matter for cost analysis.
  • Tags do not inherit automatically from parent scopes (resource group or subscription) to child resources unless you enforce that with policies or use a preview inheritance feature.
Tags do not inherit by default. If you apply tags only at the resource group or subscription level, those tags are not automatically included in billing or resource-level tag queries. Use policy enforcement (recommended for production) to enforce or copy tags to resources, or enable the preview tag-inheritance feature only after evaluating its readiness for your environment.
An infographic titled "Azure Resource Tags" showing four example uses—Adding metadata, Logical grouping, Name-value pair, and Cost management—each illustrated with Azure service icons and colored tag labels. A footer notes that tags don’t inherit by default and that Azure Policy can be used to inherit tags from a resource group or subscription.
Tag scope and behavior (quick reference) Practical implications:
  • For cost reporting, ensure tags are actually present on resources (or use Azure Policy to copy tags to resources).
  • Azure Policy is the recommended production method to apply or enforce tags automatically.
Portal: step-by-step — add or edit tags
  1. Open the Azure portal and go to All resources.
  2. Select the resource you want to tag (for example, a virtual machine).
  3. In the resource menu, choose Tags (or click Edit on the Tags blade).
  4. Add a name-value pair such as environment: Dev or cost-center: 1100, then click Save.
A screenshot of the Microsoft Azure portal showing the All resources list and the details for a storage account named "aboutrithin." The Edit tags pane is open and an "Environment" tag is being set (value "Dev").
Portal tips
  • The portal suggests previously used tag names and values, which helps maintain consistency across resources.
  • Use the All resources filter or the Tags view to list resources by tag key/value combinations.
A screenshot of the Microsoft Azure portal showing the "All resources" list with various entries (virtual machine, public IP, network security group, storage account, DNS zones, etc.). An "Add filter" dialog is open on the right, set to filter by Environment.
Edit or remove tags
  1. Open the target resource and open the Tags blade (or click Edit).
  2. Modify tag values or click the trash icon to remove a tag.
  3. Click Save. Refresh the resource list if changes do not appear immediately.
A screenshot of the Microsoft Azure portal showing details for a virtual machine named "about-rithin-vm." The page displays Essentials, Properties, Networking and Tags (Environment: Dev, Cost Center: 1100) including VM status and a public IP address.
Resource group tagging You can add and update tags on resource groups too, but remember: changing tags on a resource group does not automatically change tags on existing resources inside it unless you use Azure Policy to copy them or enable a preview inheritance feature.
A screenshot of the Microsoft Azure portal showing the "Tags" blade with tag entries like "Cost Center : 1100", "Environment : Dev", and "Environment : Prod" (the Prod tag is highlighted/clicked). The page includes a subscriptions filter and a search bar at the top.
Command-line examples
  • Azure CLI — apply tags to an existing resource (replace names as needed):
  • Azure PowerShell — set tags on a resource:
Best practices
  • Standardize tag keys and values with a naming convention (for example, environment values: dev, test, prod).
  • Enforce tag rules using Azure Policy (required fields, allowed values, or automatic copying).
  • Apply tags at resource creation to ensure early cost attribution.
  • Periodically audit tags and remove or consolidate unused tag keys.
  • Use consistent casing and separators to avoid duplicates (for example, choose either CostCenter or cost-center).
Azure enforces limits on tags (number of tags per resource and maximum lengths for key/value). These limits can change — check the Azure documentation for the current service limits before designing your tagging strategy.
Useful links and references Summary
  • Tags are key-value metadata used for identification, logical grouping, automation, and cost management.
  • Tags can be applied at subscription, resource group, or resource level — but they do not inherit automatically.
  • For billing and reporting, ensure tags are present on resources or use Azure Policy to apply/copy tags to resources.
  • Use the portal, Azure CLI, PowerShell, or policies to add, edit, filter, and manage tags consistently across your Azure estate.

Watch Video

Practice Lab