For the complete documentation index, see llms.txt. This page is also available as Markdown.

Overview

ilert's Hashicorp Terraform Integration helps you to create and manage ilert resources.

Make monitoring and alerting part of your Infrastructure as Code projects and automate your requirements efficiently with ilert's Terraform provider.

The source code of the provider is also available on Github.

provider "ilert" {
    organization = "your organization"
    username     = "your username"
    password     = "password"
}

data "ilert_escalation_policy" "default" {
  name = "Default"
}

resource "ilert_alert_source" "example" {
  name                    = "My Grafana Integration"
  integration_type        = "GRAFANA"
  escalation_policy       = data.ilert_escalation_policy.default.id
  incident_priority_rule  = "HIGH_DURING_SUPPORT_HOURS"

  support_hours {
    timezone = "Europe/Berlin"

    support_days {
      monday {
        start = "08:00"
        end   = "17:00"
      }

      tuesday {
        start = "08:00"
        end   = "17:00"
      }

      wednesday {
        start = "08:00"
        end   = "17:00"
      }

      thursday {
        start = "08:00"
        end   = "17:00"
      }

      friday {
        start = "08:00"
        end   = "17:00"
      }
    }
  }
}

Support hours in Terraform are one window per day. The provider writes support_days, which cannot express coverage that runs past midnight, covers a whole weekend in one piece, or holds two windows on the same day. Define that in ilert on account-level support hours and reference them.

Applying a plan whose support_days matches the support hour's current per-day view leaves the stored coverage as it is, so a rename or an unrelated change to the resource cannot flatten it. A support_days that differs from that view replaces the weekly coverage. That can happen without you touching the block: once the coverage has been changed in ilert, the per-day view reports it differently, and your unchanged configuration no longer matches.

Please feel free to reach out to us with a Github issue in case you need help or have feature requests.

Last updated

Was this helpful?