Adding AND resource.type="global" is not working for me.
When navigating to the metric editor in the GUI I get an error: “Chart definition invalid. The supplied filter does not specify a valid combination of metric and monitored resource descriptors. The query will not return any time series.”
Interestingly when I remove “Resource type: Global” from the “find resource type and metric” selection the error goes away and it appears to be working. However Terraform will not let me create the alert without a resource type.
below is code snippet:
conditions {
display_name = “logging/user/${google_logging_metric.cloudrun_error_alert_metric_deadline.name} [COUNT]”,
condition_threshold {
comparison = “COMPARISON_GT”
duration = “0s”
filter = “metric.type="logging.googleapis.com/user/${google_logging_metric.cloudrun_error_alert_metric_deadline.name}"AND resource.type="global"”
threshold_value = 0