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?