Skip to main content

Remediation

From Azure Portal

  1. Navigate to the storage account in the Azure portal.
  2. Under the Settings section, select Locks.
  3. Select Add.
  4. Provide a Name, and choose ReadOnly for the type of lock.
  5. 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}}