Last updated: September 14, 2026
dash0_slo
Terraform resource for Dash0 service level objectives (SLOs) defined in the OpenSLO format.
Manages a Dash0 Service Level Objective (SLO). SLOs define a reliability target for a service, measured against a service level indicator (SLI) derived from telemetry, using OpenSLO v1 documents. See SLOs and Manage SLOs as Code for more details.
Example Usage
terraform
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647resource "dash0_slo" "checkout_availability" {dataset = "default"slo_yaml = file("${path.module}/slo.yaml")}# Inline OpenSLO v1 document. SLOs are Private BETA and support a constrained# subset of OpenSLO: a single objective, an inline `ratioMetric` indicator,# `Occurrences` budgeting, and a rolling 28d (4w) window.resource "dash0_slo" "checkout_latency" {dataset = "default"slo_yaml = <<-YAMLapiVersion: openslo.com/v1kind: SLOmetadata:name: checkout-latencyannotations:dash0.com/display-name: Checkout latencydash0.com/enabled: "true"spec:description: 99 percent of checkout HTTP requests complete under 500ms over a rolling 28-day window.service: checkoutbudgetingMethod: OccurrencestimeWindow:- duration: 28disRolling: trueindicator:metadata:name: checkout-latency-ratiospec:ratioMetric:counter: truegood:metricSource:type: Prometheusspec:query: 'http_server_request_duration_seconds_bucket{service_name="checkout",le="0.5"}'total:metricSource:type: Prometheusspec:query: 'http_server_request_duration_seconds_count{service_name="checkout"}'objectives:- displayName: 99% under 500mstarget: 0.99YAML}
Schema
Required
slo_yaml(String) The SLO definition in OpenSLO v1 YAML format (apiVersion: openslo.com/v1,kind: SLO), specifying the objective target, service level indicator, budgeting method, and time window. See Create SLOs for the available options. Thedash0.com/sharingmetadata annotation is supported to control sharing settings; changes to it trigger a resource update. All other metadata annotations are managed by the server and ignored during drift detection.
Optional
dataset(String) The identifier of the Dash0 dataset that the SLO belongs to. Provide the dataset's identifier, which is immutable, not the 'name'. Datasets are used to separate observability data within a Dash0 organization. If omitted, the provider-leveldatasetdefault is used (see the provider'sdatasetattribute). Changing this value forces the resource to be recreated.
Read-Only
id(String) The server-assigned UUID of the SLO, resolved by the provider after creation. Reference this value when wiring the SLO's identifier into another resource.origin(String) A unique identifier for the SLO, automatically generated on creation. Used to reference the SLO for updates, reads, deletes, and imports.url(String) The URL to open this SLO in the Dash0 web app, derived from the Dash0 API URL and the SLO's server-assigned identifier. Computed by the provider after creation. May be empty if the app URL cannot be derived (e.g. for self-hosted deployments with a custom web app domain).
Import
Import is supported using the following syntax:
The terraform import command can be used, for example:
shell
12#!/bin/bashterraform import dash0_slo.name "{{ dataset }},{{ id_or_origin }}"