mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-20 11:48:24 -06:00
use the same error checking in DELETE
This commit is contained in:
parent
3bbb21d115
commit
39f5a7e751
@ -345,9 +345,14 @@ func resourceAwsRoute53RecordDelete(d *schema.ResourceData, meta interface{}) er
|
|||||||
// Get the records
|
// Get the records
|
||||||
rec, err := findRecord(d, meta)
|
rec, err := findRecord(d, meta)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("[DEBUG] No matching record found for: %s, removing from state file", d.Id())
|
switch err {
|
||||||
d.SetId("")
|
case r53NoHostedZoneFound, r53NoRecordsFound:
|
||||||
return err
|
log.Printf("[DEBUG] %s for: %s, removing from state file", err, d.Id())
|
||||||
|
d.SetId("")
|
||||||
|
return nil
|
||||||
|
default:
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the new records
|
// Create the new records
|
||||||
|
Loading…
Reference in New Issue
Block a user