Creating Azure resource locks

Lab Details

  1. In this lab, you will learn how to prevent users to accidently delete resources using Azure resource locks.

  2. Duration: 45 minutes

Introduction

What are Azure resource locks?

  1. Azure resource locks prevent users in an organization to accidently deleting or modifying critical resources.

  2. Azure locks are different from role-based access control in a way that using these locks you can apply restrictions across all users and roles.

  3. Users can apply locks on resource level, resource group level or subscription level.

  4. There are two types of locks available in Azure:

  • CanNotDelete: If this lock is applied to any of the resources, the user can still read or modify the resource but cannot delete it.

  • ReadOnly: As the name suggests, with this lock applied, a user can only read the resource without causing any modifications or deletions.

  1. In the Azure portal, these locks are called Delete and Read-only.

Task Details

  • Launching Lab Environment

  • Deploying a Virtual Machine

  • Creating a Delete Lock

  • Creating a Read-Only Lock

  • Deleting the Locks

  • Deleting the Virtual Machine