Organizing and Protecting Azure Resources: A Guide to Tags and Locks
Introduction
As your cloud environment grows, keeping track of your resources and preventing accidental data loss becomes a top priority. Azure provides two simple yet powerful tools for this: Tags and Resource Locks. Tags allow you to categorize resources for better billing and organization, while Locks provide a safety net against accidental deletion. In this guide, we will walk through applying these management features to a Virtual Machine and a Virtual Network.
Add Tags and a Resource Lock to a VM
- Login to Microsoft Azure at https://portal.azure.com.
- From the Azure portal home page, in the search box, enter virtual machines.
From the menu pane, select Tags.
On one line for Name enter
Departmentand for Value enterCustomer Service.On the next line, for Name enter
Purposeand for Value enterFTP Server.
Add a Resource Lock to a VM
While you’re working on the virtual machine, it’s a great time to add a resource lock to ensure it isn't accidentally removed.
- If necessary, expand the Settings submenu.
- Select Locks.
For the name, enter
VM-delete-lock.For the Lock type, select Delete.
You may enter a note to help remind you why you created the lock.
That’s it! Now the VM is protected from deletion and has tags assigned to help track use. Time to move onto the network.
- Select Home to return to the Azure portal home page.
Add Tags to Network Resources
- From the Azure portal home page, in the search box, enter virtual networks.
-
From the menu pane, select Tags.
Note: Notice that now you can select an existing tag to apply or add a new tag. You can also select just the name or value and create something new in the other field.
For the Name select
Department.For the Value enter
IT.
Conclusion
Now both the VNet and VM are organized and secured. By implementing a consistent tagging strategy, you make it much easier to filter resources and analyze your Azure bill by department or project. Furthermore, by applying a "Delete" lock, you've added a critical layer of protection for your infrastructure. These small administrative steps go a long way in maintaining a professional and reliable cloud environment.
I would love to hear from you








Top comments (0)