Classifying your resources in the cloud environment is very essential. This will enable you to identify your resources based on the setup that obtains in your organisation.
Tags are used to identify resources in the cloud. They are descriptive metadata that helps you to logically arrange your resources into a taxonomy. It consists of key-value pair. That is, a tag is a label made up of a key and an optional value.
It can be applied to Azure resources, resource groups, and subscriptions.
It helps in identifying cost of different business processes in the cloud. Organisations can use tags to identify billings associated with each departments cloud resources usage. For example, The employees' names and their departments may be used as a key-value pair:
Name of Employee Department Tag(key:value)
Gladys Procurement Gladys:Procurement
Richard Finance Richard:Finance
Catherine Sales Catherine: Sales
Other parameters can be used to create a key:value pair depending on the Company's setup and mode of operations.
Next, we will see how Resource tagging can be implemented in Microsoft Azure. The following steps will guide you
Step 2
Type 'Policy' into the Search bar and click on it
Step 3
Click on 'Assignments' to Assign a Policy
Then Click on 'Assign Policy'
Click on the small box in front of Policy Definitions and wait for it to come up
Type Tag in the Search box of the Available Definitions and Select 'Require a tag and its value on Resources'
Then Click on 'Add'
Go to Parameters and give the Tag a name and the Tag value too
The name will be Company and the Value will be Eunicloud
Therefore, the Key:Value pair is Company:Eunicloud
Please note that tag values are case sensitive.
Click on 'Review and Create'
Then, Click on 'Create'
A policy assignment was created to implement resource tagging.
Step 4
Go back to Azure portal Home page and click on Storage account
Click on 'Create'
Complete the Project details and Instance details
I will select my subscription, Azure Pass Sponsorship and Resource group is UniRg
The name of my Storage account is yemmystore (this is a random name. You can give yours any name of your choice) and I will select East US for the Region
Click on 'Review'
The Validation of the Storage account failed and could not be created. This is because of the Policy that is already assigned, requires that any resource to be created should be tagged Company:Eunicloud
Therefore, we have to assign the tag to yemmystore so that it can be created
Then Click on 'Review'
Then, Click on 'Create' and wait for the deployment to complete
The Storage Account yemmystore has been created with the tag
Company:Eunicloud
Step 5
Go back to the Home page of the Azure portal and select Policy
Click on 'Assignments'
Then Click on the Assignment name 'Require a tag and its value on Resources'
Click on 'Delete Assignment'
Select Yes in the Dialog box
The Policy assignment has been successfully deleted
I hope this is useful. When next you are creating your resources, try it out. Your workload will be well organised.
Comments are welcomed.
Top comments (0)