Resource: honeycombio_burn_alert

Creates a burn alert.

For more information about burn alerts, check out Define Burn Alerts.

Example Usage

Basic Example - Exhaustion Time Burn Alert

variable "dataset" {
  type = string
}

variable "slo_id" {
  type = string
}

resource "honeycombio_burn_alert" "example_alert" {
  alert_type         = "exhaustion_time"
  exhaustion_minutes = 480

  dataset = var.dataset
  slo_id  = var.slo_id

  # one or more recipients
  recipient {
    type   = "email"
    target = "hello@example.com"
  }

  recipient {
    type   = "slack"
    target = "#example-channel"
  }
}

Basic Example - Budget Rate Burn Alert

variable "dataset" {
  type = string
}

variable "slo_id" {
  type = string
}

resource "honeycombio_burn_alert" "example_alert" {
  alert_type                   = "budget_rate"
  budget_rate_window_minutes   = 480
  budget_rate_decrease_percent = 1

  dataset = var.dataset
  slo_id  = var.slo_id

  # one or more recipients
  recipient {
    type   = "webhook"
    target = "name of the webhook"
  }
}

Example - Exhaustion Time Burn Alert with PagerDuty Recipient and Severity

variable "dataset" {
  type = string
}

variable "slo_id" {
  type = string
}

data "honeycombio_recipient" "pd_prod" {
  type = "pagerduty"

  detail_filter {
    name  = "integration_name"
    value = "Prod On-Call"
  }
}

resource "honeycombio_burn_alert" "example_alert" {
  exhaustion_minutes = 60
  dataset            = var.dataset
  slo_id             = var.slo_id

  recipient {
    id = data.honeycombio_recipient.pd_prod.id

    notification_details {
      pagerduty_severity = "critical"
    }
  }
}

Argument Reference

The following arguments are supported:

Each burn alert configuration may have one or more recipient blocks, which each accept the following arguments. A recipient block can either refer to an existing recipient (a recipient that is already present in another burn alert or trigger) or a new recipient. When specifying an existing recipient, only id may be set. If you pass in a recipient without its ID and only include the type and target, Honeycomb will make a best effort to match to an existing recipient. To retrieve the ID of an existing recipient, refer to the honeycombio_recipient data source.

Type Target
email an email address
pagerduty _N/A_
slack name of the channel
webhook name of the webhook

Attribute Reference

In addition to all arguments above, the following attributes are exported:

Import

Burn alerts can be imported using a combination of the dataset name and their ID, e.g.

$ terraform import honeycombio_burn_alert.my_alert my-dataset/bj9BwOb1uKz