You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
locals {
slos = [ for name, x in module.slos : {
name = name
p95_slo_id = x.p95_slo_id
p99_slo_id = x.p99_slo_id
}]
}
resource "datadog_dashboard" "ordered_dashboard" {
title = "SLOs"
layout_type = "ordered"
widget {
service_level_objective_definition {
slo_id = module.all.p95_slo_id
time_windows = ["month_to_date"]
view_mode = "overall"
view_type = "detail"
show_error_budget = true
}
widget_layout {
height = 2
width = 2
x = 1
y = 0
}
}
widget {
service_level_objective_definition {
slo_id = module.all.p99_slo_id
time_windows = ["month_to_date"]
view_mode = "overall"
view_type = "detail"
show_error_budget = true
}
widget_layout {
height = 2
width = 2
x = 5
y = 0
}
}
widget {
timeseries_definition {
title = "p95 Latency Breaches"
live_span = "month_to_date"
request {
display_type = "area"
dynamic "formula" {
for_each = { for i, x in local.slos : "query${i}" => x.name }
content {
alias = formula.value
formula_expression = formula.key
}
}
dynamic "query" {
for_each = { for i, x in local.slos : "query${i}" => x.p95_slo_id }
content {
slo_query {
name = query.key
data_source = "slo"
slo_id = query.value
measure = "bad_minutes"
slo_query_type = "time_slice"
}
}
}
style {
palette = "red"
}
}
}
widget_layout {
height = 2
width = 4
x = 0
y = 2
}
}
widget {
timeseries_definition {
title = "p99 Latency Breaches"
live_span = "month_to_date"
request {
display_type = "area"
dynamic "formula" {
for_each = { for i, x in local.slos : "query${i}" => x.name }
content {
alias = formula.value
formula_expression = formula.key
}
}
dynamic "query" {
for_each = { for i, x in local.slos : "query${i}" => x.p99_slo_id }
content {
slo_query {
name = query.key
data_source = "slo"
slo_id = query.value
measure = "bad_minutes"
slo_query_type = "time_slice"
}
}
}
style {
palette = "red"
}
}
}
widget_layout {
height = 2
width = 4
x = 4
y = 2
}
}
widget {
slo_list_definition {
title = "p95 latency breakdown"
request {
query {
query_string = "name:\"p95\" -name:\"all\""
sort {
column = "status.sli"
order = "asc"
}
}
request_type = "slo_list"
}
}
widget_layout {
height = 4
width = 4
x = 0
y = 4
}
}
widget {
slo_list_definition {
title = "p99 latency breakdown"
request {
query {
query_string = "name:\"p99\" -name:\"all\""
sort {
column = "status.sli"
order = "asc"
}
}
request_type = "slo_list"
}
}
widget_layout {
height = 4
width = 4
x = 4
y = 4
}
}
}
Relevant debug or panic output
Error: object contains unparsed element: map[data_source:slo group_mode:overall measure:bad_minutes name:query0 slo_id:0c80a6d0193f5bf6b006c35f28a53fde slo_query_type:time_slice]
with datadog_dashboard.ordered_dashboard,
on dashboard.tf line 9, in resource "datadog_dashboard" "ordered_dashboard":
9: resource "datadog_dashboard" "ordered_dashboard" {
Expected Behavior
The provider should accept bad_minutes as an option to the measure field or gracefully adjust bad_events.
Actual Behavior
Setting measure to bad_minutes fails the provider's validation on the field. Setting it to bad_events passes validation and successfully deploys, but the graph is blank. Editing the graph in the UI, making no changes and saving it updates these fields to bad_minutes but causes subsequent plans to produce the error seen in the relevant debug/panic output.
Steps to Reproduce
Plan the above configuration.
Change bad_minutes to bad_events
Plan & apply
In the UI edit and save the graph making no changes
Run terraform plan again
Important Factoids
no
References
No response
The text was updated successfully, but these errors were encountered:
Datadog Terraform Provider Version
v3.46.0
Terraform Version
v1.8.5
What resources or data sources are affected?
resource_datadog_dashboard
Terraform Configuration Files
Relevant debug or panic output
Expected Behavior
The provider should accept
bad_minutes
as an option to the measure field or gracefully adjustbad_events
.Actual Behavior
Setting measure to
bad_minutes
fails the provider's validation on the field. Setting it tobad_events
passes validation and successfully deploys, but the graph is blank. Editing the graph in the UI, making no changes and saving it updates these fields tobad_minutes
but causes subsequent plans to produce the error seen in the relevant debug/panic output.Steps to Reproduce
bad_minutes
tobad_events
Important Factoids
no
References
No response
The text was updated successfully, but these errors were encountered: