Managing tags and locks on virtual machines helps you organize and protect your resources in Azure.
Tags are key-value labels (e.g., Department: IT) used to categorize and track VMs for easier management, billing, and reporting.
Locks prevent accidental changes. You can apply:
ReadOnly – prevents editing
CanNotDelete – prevents deletion
Together, tags and locks improve resource governance, security, and operational efficiency.
Role in creating Tag and Lock
Step 1 Select virtual machines under services. Select the guided-project-vm virtual machine. From the menu pane, select Tags.
Step 2 On one line for Name enter Department and for Value enter Customer Service
On the next line, for Name enter Purpose and for Value enter FTP Server.
Select Apply.
Role 2 create a resource lock to a VM
Step 1 If necessary, expand the Settings submenu.
Select Locks.Select + Add.
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. Select OK.
Role 3 Add tags to network resources
Step 1 Select virtual networks under services.
Select the guided-project-vnet network.vnet
From the menu pane, select Tags. For the Name select Department.
For the Value enter IT. Select Apply.
Top comments (0)