How to Create Tags in Microsoft Azure
Published: 2023-03-28 22:12:44


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qepia9nxfrs8y9p2p1gi.png)
Tags are defined by using name/value pairs, which you can attach to any resource or resource group. Tags provide metadata for your Azure resources and logically organizes resources into a taxonomy. Tags can then be used to select resources or Resource Groups and are useful when you need to organize resources for billing or management. Each tag consists of a name and a value pair. For example, you can apply the name “Environment” and the value “Production” to all the resources in production.

Each resource or resource group can have a maximum of 15 tags associated with it and each tag can have a character limit on their name and value.

**To create a tag, follow the below mentioned steps:**

STEP 1:
login to your Microsoft Azure Portal Dashboard(portal.azure.com)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lctswmezpyiijm5o8qwz.png)

Step 2:

Click on the search bar. Search for "Policy" and click on it

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uok76az5465uqkewme3o.png)

Step 3:

Click on "Assignments"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j2j1169wfj8isd561wt0.png)

Step 4:

Click on "Assign Policy"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eziv3bow9j3p5gclo18r.png)

Step 5:

Click on "Policy definition"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tbrka3bltc9icjfqdl19.png)

Step 6:

Search for 'Tag'
Click on "Require a tag and its value on resources"
Add

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sixhxa7khwzf4spvmdyw.png)

Step 7:
Click on "Parameters" to add your Tag Name and Tag Value

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bg29xmjty8owdhg8urpi.png)

Step 8:

Tag Name: Name of Environment
Tag Value: Name of Production/Company
Click on "Review + Create"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9rdxck97szj6knk15zhw.png)

Step 9:

Click on "Create"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6w8ljslu9pnl0xa37w2e.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vqhicaek5jlir4y9o1nz.png)

Step 10:
Create a Storage Account and add Tag

Click Home to create a Storage Account

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mkce8qw4r6e3z6zsf32v.png)

Step 11:

Click on "Create"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s9kfkq38d8icodhdwddg.png)

Step 12:

Subscription: Choose your subscription
Resource Group: Create a resource group or choose an already existing one if you already have one
Storage Account Name: Choose a unique name across all existing accounts in Azure
Region: Choose your region
Click on ' Tag' to add tag

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jqj6t049jo8fm3rbr5ei.png)

Step 13:

Use the same name you chose Name and Value in step 8
Click on "Review"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vrba73ye04irhlrff1ff.png)

Step 14:

Click on "Create"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4gt8ps74renq0u7chfu7.png)

Step 15:
A policy with an added a tag on the resource has been successfully created.
The tag in the resource is "tolubriannapurple" as shown in the attached pic.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g93aa87i1lm94ss04q5q.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xmfqqdeckcq9fv8bzgf3.png)


Step 16:
To delete the policy assignment
Click on "Home"
Follow step 2
Click on "Require a tag and its value on resources"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/02pp94sqg2dz42kxymb8.png)

Step 17:

Click on "Delete Assignment"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cj9a0ekr2ahdmawh3uxq.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ujq3k452tlpq9erv1kc7.png)