diff --git a/datadog/resource_datadog_monitor.go b/datadog/resource_datadog_monitor.go index cdf61a7c7..fdbbf3df0 100644 --- a/datadog/resource_datadog_monitor.go +++ b/datadog/resource_datadog_monitor.go @@ -136,6 +136,15 @@ func resourceDatadogMonitor() *schema.Resource { Type: schema.TypeInt, Optional: true, Default: 10, + DiffSuppressFunc: func(k, oldVal, newVal string, d *schema.ResourceData) bool { + if !d.Get("notify_no_data").(bool) { + if newVal != oldVal { + log.Printf("[DEBUG] Ignore the no_data_timeframe change of monitor '%s' because notify_no_data is false.", d.Get("name")) + } + return true + } + return newVal == oldVal + }, }, "renotify_interval": { Type: schema.TypeInt,