terraform-provider-datadog icon indicating copy to clipboard operation
terraform-provider-datadog copied to clipboard

[Dashboards] Query validation support?

Open karuj opened this issue 3 years ago • 1 comments

Hello!

My team is using terraform for our datadog needs and it seems like there is support for checking the query string for monitors, e.g. when the query is missing a bracket, I get this output during terraform plan:

│ Error: error validating monitor: 400 Bad Request: {"errors": ["The value provided for parameter 'query' is invalid"]}

AFAIK there is no such functionality for dashboard widgets, e.g. this faulty query (missing '}' in the end) will pass:

widget {
    distribution_definition {
      request {
        q = "avg:system.load.1{env:staging} by {account"
        style {
          palette = "warm"
        }
      }
      title     = "Widget Title"
      live_span = "1h"
    }
  }

Is there a plan to add this functionality or has anybody found a workaround for this?

karuj avatar Jul 28 '21 15:07 karuj

For monitors, there is a dedicated endpoint for validating queries. There is no such endpoint for validating dashboards. Until there is, this cannot be added to terraform unfortunately.

Could you contact support with this feature request so that it can be triaged by the proper backend teams ?

Thanks

zippolyte avatar Aug 02 '21 16:08 zippolyte