Error deploying storage account diagnostic setting using ARM template

Sarju Mulmi 1 Reputation point

I'm trying to deploy diagnostic settings for Azure storage using ARM templates following
Following is the snippet of the resource block:

"type": "Microsoft.Storage/storageAccounts/blobServices/providers/diagnosticsettings",  
                            "apiVersion": "2017-05-01-preview",  
                            "name": "[concat(parameters('storageAccountName'),'/default/Microsoft.Insights/', parameters('settingName'))]",  
                            "properties": {  
                                "storageAccountId": "[parameters('archiveStorageId')]",  
                                "logs": [  
                                        "category": "StorageRead",  
                                        "enabled": true  
                                        "category": "StorageWrite",  
                                        "enabled": true  
                                        "category": "StorageDelete",  
                                        "enabled": true  

However, I'm getting the following error for all storage types:

The resource type could not be found in the namespace 'Microsoft.Storage' for api version '2017-05-01-preview'  
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,923 questions
{count} votes

1 answer

Sort by: Most helpful
  1. shiva patpi 13,171 Reputation points Microsoft Employee

    Hello @Sarju Mulmi ,
    I just tried the exact same template mentioned at
    and it went through successfully.

    Please find the attached template & Parameters file

    Command used:
    az group deployment create -g resourcegroupname --template-file .\enablestoragediag.json --parameters .\parameters.json



    0 comments No comments