diff --git a/builtin/providers/digitalocean/resource_digitalocean_droplet.go b/builtin/providers/digitalocean/resource_digitalocean_droplet.go index ef25b0074..decf94476 100644 --- a/builtin/providers/digitalocean/resource_digitalocean_droplet.go +++ b/builtin/providers/digitalocean/resource_digitalocean_droplet.go @@ -189,7 +189,7 @@ func resourceDigitalOceanDropletRead(d *schema.ResourceData, meta interface{}) e droplet, _, err := client.Droplets.Get(id) if err != nil { // check if the droplet no longer exists. - if err.Error() == "Error retrieving droplet: API Error: 404 Not Found" { + if strings.Contains(err.Error(), "404 The resource you were accessing could not be found") { d.SetId("") return nil }