Azure allows Locking the resource, resource group from accidental modifications OR deletions.
Types of Locks
There are 2 types of locks:
- DELETE LOCK prevents deletion of resource
- READONLY LOCK prevents modifications Or deletion of resource
LOCK Blade
The Lock Blade is available for all the resources:
- App Service
- Virtual Machines
- Data Factory
- etc.
Now let us create a Delete Lock.
Testing Lock
Now go to the App Service & Try deleting it.
You will get the following Message preventing it from deletion.
Note
This is a wonderful feature for Administrators & Prevents accidental deletion & modifications of the Azure Resource OR Resource Groups.