← Back to list

Protecting Azure Resources from Accidental Deletion with Resource Locks

As part of my hands-on Azure journey, I completed a mini lab showcasing the use of resource locks in Azure — a built-in governance feature…

Jamar Porter · 2025-04-11 22:00 · 0 claps · 1.6 min read
#azure-resource-group #locks #protection #dlp
Open on Medium ↗
Wiki topics: ☁️ · DevOps & Cloud

Protecting Azure Resources from Accidental Deletion with Resource Locks

As part of my hands-on Azure journey, I completed a mini lab showcasing the use of resource locks in Azure — a built-in governance feature that helps prevent accidental changes or deletions to critical resources.

Objective: apply a Read-only lock on a Resource Group and confirm deletion is successfully blocked.

Step 1: Create the Resource Group

I created a new resource group named GovLab-RG in the (US) Central region under my Engineer Land subscription.

Step 2: Add Tags for Cost Management and Clarity

I tagged the resource group with owner, environment, and costcenter fields to help categorize and identify usage.

Step 3: Apply the Resource Lock

Navigated to the Locks section, created a lock named PreventDeletion, set the type to Read-only, and added notes for clarity.

Step 4: Validate the Lock Enforcement

Attempted to delete the RG but was blocked due to the active lock in place.

Can’t delete due to lock in place.

Can’t delete due to lock in place.

Summary

This quick lab confirmed how resource locks can enforce change control policies within an Azure subscription — especially in environments where multiple admins or automation scripts are involved. It’s a simple but powerful safeguard that should be part of any serious Azure governance strategy.


메타데이터
post_id
c75ccf79ccd7
slug
protecting-azure-resources-from-accidental-deletion-with-resource-locks-c75ccf79ccd7
url
https://medium.com/@jamarporter0618/protecting-azure-resources-from-accidental-deletion-with-resource-locks-c75ccf79ccd7
canonical_url
https://medium.com/@jamarporter0618/protecting-azure-resources-from-accidental-deletion-with-resource-locks-c75ccf79ccd7
author_url
https://medium.com/@jamarporter0618
status
ok
fetched_at
2026-07-17 21:46:37