DEV Community

Toluwani Oluwaloseyi
Toluwani Oluwaloseyi

Posted on

How to Create Tags in Microsoft Azure

Image description
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

Step 2:

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

Image description

Step 3:

Click on "Assignments"

Image description

Step 4:

Click on "Assign Policy"

Image description

Step 5:

Click on "Policy definition"

Image description

Step 6:

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

Image description

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

Image description

Step 8:

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

Image description

Step 9:

Click on "Create"

Image description

Image description

Step 10:
Create a Storage Account and add Tag

Click Home to create a Storage Account

Image description

Step 11:

Click on "Create"

Image description

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

Step 13:

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

Image description

Step 14:

Click on "Create"

Image description

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

Image description

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

Step 17:

Click on "Delete Assignment"

Image description

Image description

Top comments (0)