Skip to content

Conversation

alexander-akhmetov
Copy link
Contributor

@alexander-akhmetov alexander-akhmetov commented Sep 11, 2025

Adding support for conditional enrichments (limited to a single level for now):

resource "grafana_apps_alertenrichment_alertenrichment_v1beta1" "enrichment" {
  metadata {
    uid = "test_enrichment"
  }

  spec {
    title       = "Conditional alert enrichment"

    step {
      conditional {
        if {
          label_matchers = [{
            type  = "="
            name  = "severity"
            value = "critical"
          }]
        }

        then {
          step {
            assign {
              annotations = {
                escalation_level = "immediate"
              }
            }
          }
          step {
            external {
              url = "https://irm.grafana.com/create-incident"
            }
          }
        }

        else {
          step {
            assign {
              annotations = {
                escalation_level = "standard"
              }
            }
          }
        }
      }
    }
  }
}

Part of github.com/grafana/alerting-enricher/issues/73

Copy link
Contributor

In order to lower resource usage and have a faster runtime, PRs will not run Cloud tests automatically.
To do so, a Grafana Labs employee must trigger the cloud acceptance tests workflow manually.

@alexander-akhmetov alexander-akhmetov force-pushed the alexander-akhmetov/alerting-enrichment-conditionals branch 4 times, most recently from 80ce4c6 to 46620c6 Compare September 11, 2025 19:04
@alexander-akhmetov alexander-akhmetov force-pushed the alexander-akhmetov/alerting-enrichment-conditionals branch from 46620c6 to c0d7d6d Compare September 11, 2025 19:32
@alexander-akhmetov alexander-akhmetov marked this pull request as ready for review September 11, 2025 20:06
@alexander-akhmetov alexander-akhmetov requested review from a team as code owners September 11, 2025 20:06
@alexander-akhmetov alexander-akhmetov merged commit 97f8ee8 into main Sep 16, 2025
31 checks passed
@alexander-akhmetov alexander-akhmetov deleted the alexander-akhmetov/alerting-enrichment-conditionals branch September 16, 2025 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants