Implementing Resource Tagging in Azure
Tags: azure, cloud, devops, cloudcomputing
Published: 2023-05-23 19:19:18

**What are Tags?**
Tags provides metadata for Azure resources, it also logically organizes resources into a taxonomy.

Tags are very useful for rolling up billing information.

In this guide we will be creating a policy assignment that requires tagging, we will also create a storage account and test the tagging.

**_Creating a Policy Assignment that requires Tagging_**

**Step 1:**
Visit [portal.azure.com](url), login or sign up if you don't have an account, you can get a free account at [azure.microsoft.com/en-us/free/](url)

**Step 2:**
On the Azure portal page **click the search box** and **enter policy**, then **click policy**

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

**Step 3:**
On the policy page **click assignments** on the left, then **click assign a policy**

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

**Step 4:**
On the Assign Policy page **click ... button** on the right under policy definition

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

**Step 5:**
**Search for tag** in the search bar, **click require a tag and its value on resource**, then **click add**

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

**Step 6:**
**Go to the parameters tab**, then **enter a tag name** of your choice and **a tag value** of your choice then **click review + create**

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

**Step 7:**
After validation has passed **click create button**

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

**_Creating a Storage Account to test required tagging_**

**Step 1:**
Go back to Azure portal homepage then on the search bar **search for storage accounts**, then **click storage accounts**

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

**Step 2:**
On the storage accounts page **click create button**

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

**Step 3:**
On the create a storage account page, **select an existing resource group** or **create a new one**, **enter a storage account name** of your choice, also **select a region** of your choice leave performance and redundancy as default

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

**Step 4:**
**Go to tags tab**, **enter the tag name** that was created earlier and also the **tag value** created earlier then **click review**

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

**Step 5:**
After validation has passed **click create button**

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

**Step 6:**
After deployment is completed, **click Go to resource**

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

**Step 7:**
Viola!!! as you can see we have added a tag to our storage account

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