Resource Locks

Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
or

Already have an account? Sign In »

Time
3 hours 51 minutes
Difficulty
Beginner
CEU/CPE
4
Video Transcription
00:00
organizing is great and all, but
00:03
how can you protect your resources from accidental deletion or modification?
00:10
A resource lock is a setting that can be applied to a resource to block modification or deletion.
00:16
Resource locks are applied on the azure management rest API, which means that they cannot be bypassed.
00:23
All management tools like the portal as your power shall CLI and SdK s submit requests via the management. A P s
00:33
resource locks can be of two types.
00:36
Delete or read only
00:38
delete resource locks. Prevent a resource from being deleted while read only resource locks disallow modification of the resource.
00:46
You need to be careful with the read only resource locks because they may have unexpected side effects on certain resources.
00:53
For example, read only resource locks will prevent users from retrieving the access keys of a storage account.
01:00
Resource locks will work regardless of the role based access control settings and add an additional preventative step.
01:07
If you have full modification rights on a resource, you are required to remove the resource lock before you can make any modifications.
01:15
This prevents accidental modifications, even if by admins something that actually happens more often than you'd think,
01:22
Let's see how resource locks work in practice.
01:29
We'll start by finding the resource that we would like to protect.
01:33
If you have used it recently, you can click on the resource from the home page. Or you can follow the usual path through resource groups
01:42
inside the resource group, and by clicking on the resource
01:49
here on the left side, you will see the option locks.
01:53
Alternatively, you can also just search for locks in the search box.
01:59
I will click on the locks option, and as you can see, we don't have any locks. Apply to the resource Right now.
02:07
I can click on the add button and name the lock. Let's say this is the Do not delete lock.
02:17
The lock type will be delete.
02:21
I can add a note and prevent the resource from being deleted.
02:30
Once I click. OK, this resource lock will be applied to the virtual network.
02:37
Now
02:38
let's see what we can do with the virtual network.
02:42
I would like to add additional subnets. I can go and click on other sub Net. I'll call it public.
02:52
I'll choose another C i. D E r.
02:58
I'll say okay,
03:00
and as you can see the resource lock does not prevent us from modifying the resource.
03:07
Let's try to delete the resource. Now I'll go to the overview tab and I'll say, Delete.
03:15
I'll confirm that I want to delete it and as you can see, it fails the deletion because the resource lock is applied.
03:23
It says, Please remove the lock and try again.
03:27
We can go back and remove the lock.
03:37
And now if I go back to overview and try to delete the resource, everything will go without a problem.
03:49
As you can see, the resource can be deleted after we remove the resource lock.
03:59
Now you know how you can use resource locks to protect your resources.
Up Next
AZ-900 Microsoft Azure Fundamentals

In this online Microsoft Azure Fundamentals training course, students will learn basic cloud computing concepts and how these concepts are applied specifically to Microsoft Azure. Upon completion, students will be prepared to take the AZ-900 certification exam.

Instructed By