Remediation
From Azure Portalβ
- Navigate to the storage account in the Azure portal.
- Under the
Settings
section, selectLocks
. - Select
Add
. - Provide a Name, and choose
Delete
for the type of lock. - Add a note about the lock if desired.
From Azure CLIβ
Replace the information within <> with appropriate values:
az lock create --name <lock> \ --resource-group <resource-group> \ --resource <storage-account> \ --lock-type CanNotDelete \ --resource-type Microsoft.Storage/storageAccounts
From Powershellβ
Replace the information within <> with appropriate values:
New-AzResourceLock -LockLevel CanNotDelete ` -LockName <lock> ` -ResourceName <storage-account> ` -ResourceType Microsoft.Storage/storageAccounts ` -ResourceGroupName <resource-group>