We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc93ea4 commit bf52f38Copy full SHA for bf52f38
1 file changed
builtin/providers/digitalocean/resource_digitalocean_record.go
@@ -3,6 +3,7 @@ package digitalocean
3
import (
4
"fmt"
5
"log"
6
+ "strings"
7
8
"github.com/hashicorp/terraform/helper/config"
9
"github.com/hashicorp/terraform/helper/diff"
@@ -91,6 +92,13 @@ func resource_digitalocean_record_destroy(
91
92
err := client.DestroyRecord(s.Attributes["domain"], s.ID)
93
94
if err != nil {
95
+
96
+ // If the record is somehow already destroyed, mark as
97
+ // succesfully gone
98
+ if strings.Contains(err.Error(), "404 Not Found") {
99
+ return nil
100
+ }
101
102
return fmt.Errorf("Error deleting record: %s", err)
103
}
104
0 commit comments