Introduction
After configuring the virtual network, virtual machine, and storage resources in the previous exercises, the next step is to improve how these resources are organized and protected. As cloud environments grow, managing resources efficiently becomes increasingly important for administrators.
Azure provides features such as tags and resource locks to help with this. Tags allow resources to be categorized using key-value pairs, making it easier to track things like department ownership or resource purpose. Resource locks help prevent accidental deletion or modification of critical resources, adding an extra layer of protection.
In this exercise, you will add tags to organize resources and apply a resource lock to protect the virtual machine from accidental deletion.
1. Add tags to a virtual machine
Start by adding a pair of tags to the virtual machine. One tag will identify the purpose of the virtual machine and the other will indicate the department the machine supports.
Login to Microsoft Azure at https://portal.azure.com
From the Azure portal home page, search for and select virtual machines created earlier.
- Select the guided-project-vm virtual machine and from the menu pane, select Tags.
Enter the following values:
Name: Department
Value: Customer Service
Add another tag:
Name: Purpose
Value: FTP Server
Then select Apply.
2. Add a resource lock to a VM
Expand the Settings submenu and select Locks.
Select + Add.
Configure the lock using the following values:
Name: VM-delete-lock
Lock Type: Delete
You may optionally enter a note describing the reason for the lock.
Then select ok
Now the VM is protected from accidental deletion and also has tags assigned to help track its use.
2. Add tags to network resources
- From the Azure portal home page, navigate to the virtual network created earlier. Example:
guided-project-vnet
- From the menu pane, select Tags. Ener the following values:
Name: Department
Value: IT
Then select Apply.
Now both the virtual machine and the virtual network are organized using tags, making them easier to identify and manage within the Azure environment.
Conclusion
In this exercise, you improved the organization and protection of Azure resources by using tags and resource locks. Tags help administrators categorize resources based on attributes such as department or purpose, while resource locks prevent accidental deletion or modification of important infrastructure. These features help maintain better structure and control when managing resources in Azure environments.




Top comments (0)
Some comments may only be visible to logged-in visitors. Sign in to view all comments.