Skip to content

Commit

Permalink
Merge pull request #384 from abicky/ignore-no-data-timeframe-change
Browse files Browse the repository at this point in the history
  • Loading branch information
gzussa authored Jan 17, 2020
2 parents a2265c9 + a5a1994 commit 0dc57dd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions datadog/resource_datadog_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0dc57dd

Please sign in to comment.