azurecommand-line-interfacestorageaccount

Disable entire Azure storage account


Is it possible to disable the entire storage account using az cli? I looked through all properties for a storage account and couldn't find anything related to it.

Thanks.


Solution

  • Is it possible to disable the entire storage account using az cli?

    AFAIK, There is no direct command to disable the entire storage account using Azure CLI.

    I agree with both acrophat's and Anthony Norwood's comments.

    You can use the below command to disable networking.

    Command:

    az storage account update --name MyStorageAccount --resource-group MyResourceGroup --public-network-access Disabled
    

    Output:

    "provisioningState": "Succeeded",
     "publicNetworkAccess": "Disabled",
    

    Portal: enter image description here

    Now users like reader role can't able to read the files.

    enter image description here

    Reference:

    Configure Azure Storage firewalls and virtual networks | Microsoft Learn