DataDog / terraform-provider-datadog

Terraform Datadog provider
https://www.terraform.io/docs/providers/datadog/
Mozilla Public License 2.0
403 stars 379 forks source link

object contains unparsed element in datadog_service_level_objective resource #2378

Closed lfgarciaBC closed 6 months ago

lfgarciaBC commented 6 months ago

Datadog Terraform Provider Version

v3.38.0

Terraform Version

v1.7.5

What resources or data sources are affected?

Terraform Configuration Files

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
  }
}

Relevant debug or panic output

╷
│ 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" {
│ 

Expected Behavior

plan and apply succeeds without error

Actual Behavior

terraform apply throws an error even when the resource was created successfully image

Steps to Reproduce

  1. terrafrom plan creates the plan successfully
    
    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:

module.dashboards.module.reliability-api.datadog_service_level_objective.slo_test will be created

I started getting this error since this week, before that terraform apply was completed successfully

Important Factoids

No response

References

No response

therve commented 6 months ago

Duplicate of #2377