# Infrastructure as code

Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fuser-guides%2Fslos%2FIaC.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fuser-guides%2Fslos%2FIaC.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

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/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/docs/developer-portal/apis/data-management/alerts-api/alerts-v2-v3-migration/.md).

## Terraform provider[​](#terraform-provider "Direct link to 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[​](#slos "Direct link to 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.

### SLO burn rate alerts[​](#slo-burn-rate-alerts "Direct link to 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[​](#slo-error-budget-alerts "Direct link to 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"`.
