Merge pull request #2546 from hashicorp/b-dme-not-found
providers/dme: unable to find record, set ID to "" [GH-2440]
This commit is contained in:
commit
9100ad57f6
|
@ -110,6 +110,11 @@ func resourceDMERecordRead(d *schema.ResourceData, meta interface{}) error {
|
|||
|
||||
rec, err := client.ReadRecord(domainid, recordid)
|
||||
if err != nil {
|
||||
if strings.Contains(err.Error(), "Unable to find") {
|
||||
d.SetId("")
|
||||
return nil
|
||||
}
|
||||
|
||||
return fmt.Errorf("Couldn't find record: %s", err)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue