Skip to content

Commit

Permalink
Be a bit more creative in validate use
Browse files Browse the repository at this point in the history
  • Loading branch information
therve committed Aug 21, 2020
1 parent 0f26e1f commit 6c94256
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions datadog/resource_datadog_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ func resourceDatadogMonitor() *schema.Resource {
"validate": {
Type: schema.TypeBool,
Optional: true,
Default: true,
},
},
}
Expand Down Expand Up @@ -364,7 +363,7 @@ func resourceDatadogMonitorCustomizeDiff(diff *schema.ResourceDiff, meta interfa
// Same for type
return nil
}
if !diff.Get("validate").(bool) {
if validate, ok := diff.GetOkExists("validate"); ok && !validate.(bool) {
// Explicitly skip validation
return nil
}
Expand Down

0 comments on commit 6c94256

Please sign in to comment.