terraform-provider-stackitp.../docs/data-sources/observability_alertgroup.md
2025-04-29 11:43:05 +02:00

2.3 KiB

page_title subcategory description
stackit_observability_alertgroup Data Source - stackit Observability alert group datasource schema. Used to create alerts based on metrics (Thanos). Must have a region specified in the provider configuration.

stackit_observability_alertgroup (Data Source)

Observability alert group datasource schema. Used to create alerts based on metrics (Thanos). Must have a region specified in the provider configuration.

Example Usage

data "stackit_observability_alertgroup" "example" {
  project_id  = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  name        = "example-alert-group"
}

Schema

Required

  • instance_id (String) Observability instance ID to which the alert group is associated.
  • name (String) The name of the alert group. Is the identifier and must be unique in the group.
  • project_id (String) STACKIT project ID to which the alert group is associated.

Read-Only

  • id (String) Terraform's internal resource ID. It is structured as "project_id,instance_id,name".
  • interval (String) Specifies the frequency at which rules within the group are evaluated. The interval must be at least 60 seconds and defaults to 60 seconds if not set. Supported formats include hours, minutes, and seconds, either singly or in combination. Examples of valid formats are: '5h30m40s', '5h', '5h30m', '60m', and '60s'.
  • rules (Attributes List) (see below for nested schema)

Nested Schema for rules

Read-Only:

  • alert (String) The name of the alert rule. Is the identifier and must be unique in the group.
  • annotations (Map of String) A map of key:value. Annotations to add or overwrite for each alert
  • expression (String) The PromQL expression to evaluate. Every evaluation cycle this is evaluated at the current time, and all resultant time series become pending/firing alerts.
  • for (String) Alerts are considered firing once they have been returned for this long. Alerts which have not yet fired for long enough are considered pending. Default is 0s
  • labels (Map of String) A map of key:value. Labels to add or overwrite for each alert