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

Cannot set to Advanced option for Monitor `Before evaluating new groups, wait 0 seconds`

Open DingGGu opened this issue 2 years ago • 4 comments

Terraform Version

Terraform v1.3.7 on darwin_arm64

  • provider registry.terraform.io/datadog/datadog v3.21.0
  • provider registry.terraform.io/hashicorp/http v3.2.1

Terraform Configuration Files

resource "datadog_monitor" "event" {
  name  = "event"
  query = "events(\"source:event\").rollup(\"count\").by(\"@evt.id\").last(\"5m\") > 0"
  type  = "event-v2 alert"

  message = "{{#is_alert}}@{{/is_alert}}"

  monitor_thresholds {
    critical = "0"
  }

  new_host_delay = "0"
}

Expected Behavior

evaluating new group delay was set to 0 in datadog monitor edit web ui

Actual Behavior

evaluating new group delay was set to 60 in datadog monitor edit web ui image

Both set new_host_delay, new_group_delay to 0 was not work too.

DingGGu avatar Mar 24 '23 07:03 DingGGu

I encountered the same issue. When I set new_group_delay = 0, this provider set the default value 60 to Datadog . When I set new_group_delay = 1, this provider set the value 1 to Datadog. So I think this provider may not handle zero value correctly.

civitaspo avatar May 30 '23 22:05 civitaspo

https://github.com/DataDog/terraform-provider-datadog/blob/7294c9cf6f17c9229f4bbd1e9b007960242f5d08/datadog/resource_datadog_monitor.go#L185-L191

I see... so that's how it doesn't work...

civitaspo avatar May 30 '23 22:05 civitaspo

So, there is no way to set to 0?

DingGGu avatar Jun 01 '23 05:06 DingGGu

Yes, I think so.

civitaspo avatar Jun 01 '23 07:06 civitaspo