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
|
||||
rec, err := findRecord(d, meta)
|
||||
if err != nil {
|
||||
log.Printf("[DEBUG] No matching record found for: %s, removing from state file", d.Id())
|
||||
d.SetId("")
|
||||
return err
|
||||
switch err {
|
||||
case r53NoHostedZoneFound, r53NoRecordsFound:
|
||||
log.Printf("[DEBUG] %s for: %s, removing from state file", err, d.Id())
|
||||
d.SetId("")
|
||||
return nil
|
||||
default:
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// Create the new records
|
||||
|
Loading…
Reference in New Issue
Block a user