You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.
Terraform Version
1.8.3
AzureRM Provider Version
3.104.0
Affected Resource(s)/Data Source(s)
azurerm_monitor_scheduled_query_rules_alert
Terraform Configuration Files
// using example from docs @// https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/monitor_scheduled_query_rules_alertresource"azurerm_monitor_scheduled_query_rules_alert""dependency" {
name ="RESOURCE_NAME"
location ="eastus2"
resource_group_name =var.this_resource_group_name// actual value added, but comes from an output from module.app_insights_alertsaction {
action_group = ["/subscriptions/<sub_GUID>/resourceGroups/<this_resource_group_name>/providers/Microsoft.Insights/actionGroups/ag-RESOURCE_NAME"]
}
data_source_id ="/subscriptions/<sub_GUID>/resourceGroups/<this_resource_group_name>/providers/Microsoft.Insights/components/appi-RESOURCE_NAME"
description ="Alert when dependency failures rise, but filter out HEAD requests that fail. 404s to Blob HEAD requests are expected."
enabled =true
query =format(<<-QUERY dependencies | where success == false AND name !startswith "HEAD" | count QUERY
)
severity =1
frequency =10
time_window =15trigger {
operator ="GreaterThan"
threshold =90
}
depends_on = [module.app_insights_alerts]
}
Debug Output/Panic Output
│ Scheduled Query Rule Name: "RESOURCE_NAME"): unexpected status 400 (400 Bad Request) with error: DraftClientException: The request had some invalid properties Activity ID: b1d537ed-6daf-4239-a59c-0cc6f741a779.
Expected Behaviour
Expects the resource to be created
Actual Behaviour
Fails on Apply
Steps to Reproduce
terraform apply
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered:
Hi @joshvito, thanks for submitting this. The azurerm_monitor_scheduled_query_rules_alertsource code has no change in last 4 months, this might due to service backend change.
We also got this error but it turned out that our query wasn't valid for the scope, for example we were searching exceptions but the scope was the underlying log analytics workspace not application insights. We also used the v2 resource azurerm_monitor_scheduled_query_rules_alert_v2
Is there an existing issue for this?
Community Note
Terraform Version
1.8.3
AzureRM Provider Version
3.104.0
Affected Resource(s)/Data Source(s)
azurerm_monitor_scheduled_query_rules_alert
Terraform Configuration Files
Debug Output/Panic Output
│ Scheduled Query Rule Name: "RESOURCE_NAME"): unexpected status 400 (400 Bad Request) with error: DraftClientException: The request had some invalid properties Activity ID: b1d537ed-6daf-4239-a59c-0cc6f741a779.
Expected Behaviour
Expects the resource to be created
Actual Behaviour
Fails on Apply
Steps to Reproduce
terraform apply
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: