Remediation
From Azure Portal
- Navigate to the storage account in the Azure portal.
- Under the
Settingssection, selectLocks. - Select
Add. - Provide a Name, and choose
ReadOnlyfor 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-name}} \
--resource-group {{resource-group-name}} \
--resource {{storage-account-name}} \
--lock-type ReadOnly \
--resource-type Microsoft.Storage/storageAccounts
From Powershell
Replace the information within {{}} with appropriate values:
New-AzResourceLock `
-LockLevel ReadOnly `
-LockName {{lock-name}} `
-ResourceName {{storage-account-name}} `
-ResourceType Microsoft.Storage/storageAccounts `
-ResourceGroupName {{resource-group-name}}