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)
Step 2:
Click on the search bar. Search for "Policy" and click on it
Step 3:
Click on "Assignments"
Step 4:
Click on "Assign Policy"
Step 5:
Click on "Policy definition"
Step 6:
Search for 'Tag'
Click on "Require a tag and its value on resources"
Add
Step 7:
Click on "Parameters" to add your Tag Name and Tag Value
Step 8:
Tag Name: Name of Environment
Tag Value: Name of Production/Company
Click on "Review + Create"
Step 9:
Click on "Create"
Step 10:
Create a Storage Account and add Tag
Click Home to create a Storage Account
Step 11:
Click on "Create"
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
Step 13:
Use the same name you chose Name and Value in step 8
Click on "Review"
Step 14:
Click on "Create"
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.
Step 16:
To delete the policy assignment
Click on "Home"
Follow step 2
Click on "Require a tag and its value on resources"
Step 17:
Click on "Delete Assignment"
Top comments (0)