Not able to set 'isHnsEnabled' property on existing azure storage account

Anonymous
2023-12-06T10:27:25.0933333+00:00

We are not facing any issue whle creating new storage account with property 'isHnsEnabled' to true. But same property when we want to set for existing sotrage account we got below error.

Error:

The property 'isHnsEnabled' was specified in the input, but it cannot be updated as it is read-only.

As per the error we understand the isHnsEnabled property can only be set when creating new resource and after that it'll be read only. The only option left for us to delete and recreate the storage account. Bu we can't get the same storage account name again as we have delete retention policy assigned.

Can someone suggest us isthere a way to set 'isHnsEnabled'  to true on existing storage account.

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,912 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Luis Arias 5,981 Reputation points
    2023-12-06T13:16:43.02+00:00

    Hello RaveendraBabu Mekapothula,

    As you mention It isn't possible to enable Hierarchical namespace as config on your storage account. However you can migrate an existing storage account to storage datalake (So enable Hierarchical namespace )

    https://learn.microsoft.com/en-us/azure/storage/blobs/upgrade-to-data-lake-storage-gen2-how-to?tabs=azure-portal

    On the other hand it's also not possible, for now, a way to purge the storage account that is recently deleted so if you want to create an storage account with HNS enable you will need to modify your storage account name or wait 14 days to delete it completely.

    User's image

    Here additional information on a different thread:

    https://stackoverflow.com/questions/75595487/how-to-permanently-purge-deleted-azure-storage-account

    Let me know if you need further assitance.

    Luis,


    If the information helped address your question, please Accept the answer.