Hi All,
I'm trying to code a Cloud Run active instance count alert with Terraform.
I've tried that, build with samples found on the web :
resource "google_monitoring_alert_policy" "cloud_run_instances_count" {
display_name = "CR Instances count"
combiner = "OR"
conditions {
display_name = "test condition"
condition_threshold {
duration = "60s"
comparison = "COMPARISON_GT"
aggregations {
alignment_period = "60s"
per_series_aligner = "ALIGN_RATE"
}
trigger {
count = 4
}
}
}
notification_channels = "${google_monitoring_notification_channel.xxx.*.id}"
}
But I have the following errors :
Error: Error creating AlertPolicy: googleapi: Error 400: The supplied filter does not specify a valid combination of metric and monitored resource descriptors. The query will not return any time series.with google_monitoring_alert_policy.cloud_run_instances_count
on _alerting.tf line 11, in resource "google_monitoring_alert_policy" "cloud_run_instances_count":resource "google_monitoring_alert_policy" "cloud_run_instances_count" {
I have no more ideas to make it working; any help would be appreciated !
thks
T.