Closed lfgarciaBC closed 6 months ago
v3.38.0
v1.7.5
resource "datadog_service_level_objective" "slo_test" { name = "SLO test" type = "metric" query { numerator = "sum:aws.applicationelb.request_count{*} by {app}.as_count() - sum:aws.applicationelb.httpcode_elb_5xx{*} by {app}.as_count()" denominator = "sum:aws.applicationelb.request_count{*} by {app}.as_count()" } thresholds { timeframe = "7d" target = 99.95 warning = 99.96 } }
╷ │ Error: object contains unparsed element: map[count:map[good_events_query:map[formulas:[map[formula:(query1 - query2)]] queries:[map[data_source:metrics name:query1 query:sum:aws.applicationelb.request_count{*}by{app}.as_count()] map[data_source:metrics name:query2 query:sum:aws.applicationelb.httpcode_elb_5xx{*}by{app}.as_count()]]] total_events_query:map[formulas:[map[formula:query1]] queries:[map[data_source:metrics name:query1 query:sum:aws.applicationelb.request_count{*}by{app}.as_count()]]]]] │ │ with module.dashboards.module.reliability-api.datadog_service_level_objective.slo_test, │ on dashboards/reliability-api/main.tf line 174, in resource "datadog_service_level_objective" "slo_test": │ 174: resource "datadog_service_level_objective" "slo_test" { │
plan and apply succeeds without error
terraform apply throws an error even when the resource was created successfully
terraform apply
terrafrom plan
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create
Terraform will perform the following actions:
resource "datadog_service_level_objective" "slo_test" {
id = (known after apply)
name = "SLO test"
target_threshold = (known after apply)
timeframe = (known after apply)
type = "metric"
warning_threshold = (known after apply)
query {
thresholds {
2. `terraform apply` throws the error
I started getting this error since this week, before that terraform apply was completed successfully
No response
Duplicate of #2377
Datadog Terraform Provider Version
v3.38.0
Terraform Version
v1.7.5
What resources or data sources are affected?
Terraform Configuration Files
Relevant debug or panic output
Expected Behavior
plan and apply succeeds without error
Actual Behavior
terraform apply
throws an error even when the resource was created successfullySteps to Reproduce
terrafrom plan
creates the plan successfullyTerraform will perform the following actions:
module.dashboards.module.reliability-api.datadog_service_level_objective.slo_test will be created
resource "datadog_service_level_objective" "slo_test" {
id = (known after apply)
name = "SLO test"
target_threshold = (known after apply)
timeframe = (known after apply)
type = "metric"
warning_threshold = (known after apply)
query {
thresholds {
I started getting this error since this week, before that
terraform apply
was completed successfullyImportant Factoids
No response
References
No response