Reputation: 1107
I'm creating a metric alert on Azure storage for that I do have an ARM template While I execute it through Azure Powershell then I receive an error as mentioned below and I'm not sure what is causing this issue.
POWERSHELL COMMAND : New-AzResourceGroupDeployment -name "StorageBlobDeployment" -ResourceGroupName TestStorage-RG -TemplateFile "C:\ARM\azureDeploy.storage.json" -TemplateParameterFile "C:\ARM\azureDeploy.storage.parameters.json"
Though it works fine when I deploy same ARM template through Portal.
ERROR below:
new-AzResourceGroupDeployment : 2:37:34 PM - Resource microsoft.insights/metricAlerts '-storage_account_ingress_traffic_alert' failed with message '{
"Code": "BadRequest",
"Message": "The resource type could not be found in the namespace 'Microsoft.storage' for api version '2018-01-01'."
}
Upvotes: 0
Views: 1277
Reputation: 72151
I suppose this is happening because your Azure Powershell is outdated. Update it and it will work just fine.
Upvotes: 1