Lab 3: Governance Practice With Tags, Resource Locks, Azure Policy and RBAC Reader Role

Microsoft Azure Fundamentals AZ 900 50 min min read Updated: Nov 17, 2026 Beginner
Lab 3: Governance Practice With Tags, Resource Locks, Azure Policy and RBAC Reader Role
Beginner Topic 3 of 3

Goal

Practice four governance tools on one resource group.

Step 1: Create a Group With Tags

bash az group create --name rg-lab3 --location centralindia --tags env=lab owner=student az group show --name rg-lab3 --query tags

Step 2: Create a Storage Account and Tag It

bash az storage account create --name stlab3demo12345 --resource-group rg-lab3 --location centralindia --sku Standard_LRS --tags env=lab cost-center=training
Tag note Tags on the group are not inherited by its resources. Each resource has its own tags.

Step 3: Add a Delete Lock

bash az lock create --name no-delete --lock-type CanNotDelete --resource-group rg-lab3 az storage account delete --name stlab3demo12345 --resource-group rg-lab3 --yes

The delete command fails because of the lock. Remove it before cleanup:

bash az lock delete --name no-delete --resource-group rg-lab3

Step 4: Assign Azure Policy (Allowed Locations)

  1. In the portal search Policy, then Assignments, then Assign policy
  2. Scope: the resource group rg-lab3
  3. Policy definition: Allowed locations
  4. Parameters: choose Central India only
  5. Create the assignment and wait a few minutes

Step 5: Test the Policy

bash az storage account create --name stlab3other12345 --resource-group rg-lab3 --location eastus --sku Standard_LRS

The request is denied by policy because East US is not allowed.

Step 6: Look at Access (RBAC)

  1. Open rg-lab3, then Access control (IAM)
  2. Click Role assignments and see who has Owner
  3. Click Roles and read the description of Reader and Contributor
  4. If you have a second test user, give Reader and confirm they cannot create anything

Step 7: Clean Up

  1. Delete the policy assignment from Policy, Assignments
  2. Make sure the lock is removed (Step 3)
  3. Delete the group
bash az group delete --name rg-lab3 --yes --no-wait

Questions

  1. Why did the delete fail even though you are Owner?
  2. Which tool blocked the East US storage account?
  3. Are tags on a group inherited by resources?

Conclusion

You used tags, a delete lock, an allowed-locations policy and RBAC views to practice Azure governance.

Quick Summary: tags; storage; lock; policy; test; RBAC; cleanup.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators