---
title: Infrastructure as code
description: Manage Coralogix SLOs, SLO burn rate alerts, and SLO error budget alerts as code with the Coralogix Terraform provider.
url: https://coralogix.com/docs/user-guides/slos/IaC/
product: slo-mgmt
feature: SLO
feature_id: slo
feature_identifier: slo-mgmt/slo
last_updated: '2026-11-11'
---

# Infrastructure as code

Coralogix supports Service Level Objectives (SLOs) through multiple deployment and management options. Depending on your environment, you can choose automated provisioning through the Coralogix Terraform provider or Kubernetes-native automation via the Coralogix Operator (coming soon).

Note

To create SLO alerts via Terraform, [Alerts API v3](https://coralogix.com/docs/developer-portal/apis/data-management/alerts-api/alerts-grpc-api.md) is required. To migrate from Alerts API v2 to v3, follow [this guide](https://coralogix.com/docs/developer-portal/apis/data-management/alerts-api/alerts-v2-v3-migration.md).

## Terraform provider

The Coralogix Terraform provider allows you to define and manage SLOs as code, ensuring consistent provisioning across environments. Learn more about using the Coralogix Terraform provider to create and manage SLOs in the [Coralogix Terraform Provider documentation](https://github.com/coralogix/terraform-provider-coralogix).

Note

You cannot create an SLO on an empty dataset. Ensure that the metric on which your SLO is based is actively reporting data to Coralogix before attempting to create the SLO. In practice, this means the metric chosen for an SLO must already be sending data to Coralogix.

### SLOs

Set up SLOs [here](https://registry.terraform.io/providers/coralogix/coralogix/latest/docs/resources/slo_v2). Run `terraform init -upgrade` to make sure your setup uses the latest version of the Terraform Provider.

30-day compliance window

The SLO API and Terraform provider accept a **30-day** rolling compliance window, in addition to the 1-, 7-, 14-, 21-, and 28-day windows offered in the SLO Center. The 30-day window is not yet selectable in the SLO Center UI. Set it through the `slo_v2` resource or the [SLO Management API](https://coralogix.com/docs/developer-portal/apis/data-management/slo-management-api.md).

### SLO burn rate alerts

Create SLO burn rate alerts [here](https://registry.terraform.io/providers/coralogix/coralogix/latest/docs/resources/alert) using `resource "coralogix_alert" "slo_alert_burn_rate"`.

### SLO error budget alerts

Create SLO error budget alerts [here](https://registry.terraform.io/providers/coralogix/coralogix/latest/docs/resources/alert) using `resource "coralogix_alert" "slo_alert_error_budget"`.
