Skip to content

google_monitoring_alert_policy: doesn't support timeWindow #4528

@IRus

Description

@IRus

Community Note

  • 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. If the issue is assigned to the "modular-magician" user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If the issue is assigned to a user, that user is claiming responsibility for the issue. If the issue is assigned to "hashibot", a community member has claimed the issue already.

Description

I'd like to specify Metric rate (percent) of change condition for alert policy with tf

New or Affected Resource(s)

  • google_monitoring_alert_policy

Potential Terraform Configuration

resource "google_monitoring_alert_policy" "my_endpoint_p2" {
  display_name = "My Endpoint"
  enabled = true
  combiner = "OR"

  conditions {
    display_name = "Fallback calls count"
    condition_threshold {
      aggregations {
        alignment_period = "60s"
        cross_series_reducer = "REDUCE_SUM"
        per_series_aligner = "ALIGN_PERCENT_CHANGE"
      }
      comparison = "COMPARISON_GT"
      time_window = "300s"
      filter = "metric.type=\"custom.googleapis.com/my/endpoint/http/fallback\" resource.type=\"global\""
      threshold_value = 5
      trigger {
        count = 1
      }
    }
  }

  notification_channels = [...]
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions