Skip to content

Commit f4bbfe7

Browse files
authored
Handle result in 404 case in monitor (#824)
If we have a 404 in the retry, we need to check the ID again outside of it.
1 parent 5f12013 commit f4bbfe7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

datadog/resource_datadog_monitor.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,10 @@ func resourceDatadogMonitorRead(d *schema.ResourceData, meta interface{}) error
461461
return err
462462
}
463463

464+
if d.Id() == "" {
465+
return nil
466+
}
467+
464468
thresholds := make(map[string]string)
465469

466470
if v, ok := m.Options.Thresholds.GetOkOk(); ok {

0 commit comments

Comments
 (0)