0
0
Azurecloud~30 mins

Resource locks (delete, read-only) in Azure - Mini Project: Build & Apply

Choose your learning style9 modes available
Azure Resource Locks: CanNotDelete and Read-Only
📖 Scenario: You are managing an Azure subscription where you want to protect important resources from accidental deletion or modification. To do this, you will apply resource locks.Resource locks help prevent unwanted changes by setting rules that block delete or update actions on resources.
🎯 Goal: Create an Azure resource group and apply two types of resource locks: a CanNotDelete lock to prevent deletion, and a ReadOnly lock to prevent any changes.This will help you understand how to protect your cloud resources effectively.
📋 What You'll Learn
Create an Azure resource group named TestResourceGroup in the eastus region.
Create a CanNotDelete lock named DeleteLock on the resource group.
Create a ReadOnly lock named ReadOnlyLock on the resource group.
Use Azure CLI commands exactly as specified.
💡 Why This Matters
🌍 Real World
Resource locks are used in real Azure environments to protect critical resources from accidental deletion or modification, ensuring stability and security.
💼 Career
Understanding resource locks is essential for cloud administrators and engineers to safeguard infrastructure and maintain compliance.
Progress0 / 4 steps
1
Create the Azure resource group
Write the Azure CLI command to create a resource group named TestResourceGroup in the eastus region.
Azure
Need a hint?

Use az group create with --name and --location options.

2
Add a CanNotDelete lock to the resource group
Write the Azure CLI command to create a resource lock named DeleteLock of type CanNotDelete on the resource group TestResourceGroup.
Azure
Need a hint?

Use az lock create with --name DeleteLock, --lock-type CanNotDelete, and --resource-group TestResourceGroup.

3
Add a ReadOnly lock to the resource group
Write the Azure CLI command to create a resource lock named ReadOnlyLock of type ReadOnly on the resource group TestResourceGroup.
Azure
Need a hint?

Use az lock create with --name ReadOnlyLock, --lock-type ReadOnly, and --resource-group TestResourceGroup.

4
Verify the resource locks on the resource group
Write the Azure CLI command to list all locks on the resource group TestResourceGroup to verify both locks are applied.
Azure
Need a hint?

Use az lock list with --resource-group TestResourceGroup to see all locks.