Resource for interacting with the slo_correction API.
# Create a new Datadog SLO correction. slo_id can be derived from slo resource or specify an slo id of an existing SLO.
resource "datadog_service_level_objective" "example_slo" {
name = "example slo"
type = "metric"
description = "some updated description about example_slo SLO"
query {
numerator = "sum:my.metric{type:good}.as_count()"
denominator = "sum:my.metric{type:good}.as_count() + sum:my.metric{type:bad}.as_count()"
}
thresholds {
timeframe = "7d"
target = 99.5
warning = 99.8
}
tags = ["foo:bar"]
}
resource "datadog_slo_correction" "example_slo_correction" {
category = "Scheduled Maintenance"
description = "correction example"
start = 1735707000
end = 1735718600
slo_id = datadog_service_level_objective.example_slo.id
timezone = "UTC"
}
resource "datadog_slo_correction" "example_slo_correction_with_recurrence" {
category = "Scheduled Maintenance"
description = "correction example with recurrence"
start = 1735707000
rrule = "FREQ=DAILY;INTERVAL=3;COUNT=3"
duration = 3600
slo_id = datadog_service_level_objective.example_slo.id
timezone = "UTC"
}
category
(String) Category the SLO correction belongs to. Valid values are Scheduled Maintenance
, Outside Business Hours
, Deployment
, Other
.slo_id
(String) ID of the SLO that this correction will be applied to.start
(Number) Starting time of the correction in epoch seconds.description
(String) Description of the correction being made.duration
(Number) Length of time in seconds for a specified rrule
recurring SLO correction (required if specifying rrule
)end
(Number) Ending time of the correction in epoch seconds. Required for one time corrections, but optional if rrule
is specifiedrrule
(String) Recurrence rules as defined in the iCalendar RFC 5545. Supported rules for SLO corrections are FREQ
, INTERVAL
, COUNT
and UNTIL
.timezone
(String) The timezone to display in the UI for the correction times (defaults to "UTC")id
(String) The ID of this resource.Import is supported using the following syntax:
terraform import datadog_slo_correction.testing_slo_correction 11111111-3fee-11eb-8a13-77cd9f15119e