Skip to content

Commit 7bb2a26

Browse files
committed
providers/dme: unable to find record, set ID to "" [hashicorpGH-2440]
1 parent da1cac6 commit 7bb2a26

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

builtin/providers/dme/resource_dme_record.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ func resourceDMERecordRead(d *schema.ResourceData, meta interface{}) error {
110110

111111
rec, err := client.ReadRecord(domainid, recordid)
112112
if err != nil {
113+
if strings.Contains(err.Error(), "Unable to find") {
114+
d.SetId("")
115+
return nil
116+
}
117+
113118
return fmt.Errorf("Couldn't find record: %s", err)
114119
}
115120

0 commit comments

Comments
 (0)