question

AzureAdmin-3231 avatar image
0 Votes"
AzureAdmin-3231 asked olgaoos answered

Unable to delete Resource Group because of corrupt microsoft.insights/scheduledqueryrules resource

Using Bicep with the following resource 'Microsoft.Insights/scheduledQueryRules@2021-02-01-preview' it is possible to create a LogToMetric kind of scheduledQueryRule.

When deploying you get an error that location needs to be 'Global' this is normally the location of the Log Analytics workspace location. When setting it to 'Global' the deployment will work with an Bicep generated ARM template.

The rule is working with the location as 'Global' but whenever changes are made, or try to delete the resource it will give an error like this:

Error code BadRequest
Message Location global is not supported for LogToMetric action

This result in a Resource Group in Azure that cannot be deleted because of the same error.

So it looks like an issue with the 2021-02-01-preview where LogToMetric is part of.

Any advice on how to delete the Resource Group?

azure-monitor
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

olgaoos avatar image
0 Votes"
olgaoos answered

Hello @AzureAdmin-3231,

We apologize for the difficulties in managing ARM resources. It appears that where was a bug in the Backend. We appreciate you bringing this to our attention by creating the support ticket. Thanks to this , our engineering team was able to identify and fix the issue.

Your time and patience are greatly appreciated and again apologies on the inconvenience.

Sincerely,
Olga

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.