Logging that the DO droplet wasn't found before removing it
This commit is contained in:
parent
2504cb4624
commit
6a811e2e4f
|
@ -190,6 +190,7 @@ func resourceDigitalOceanDropletRead(d *schema.ResourceData, meta interface{}) e
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// check if the droplet no longer exists.
|
// check if the droplet no longer exists.
|
||||||
if resp.StatusCode == 404 {
|
if resp.StatusCode == 404 {
|
||||||
|
log.Printf("[WARN] DigitalOcean Droplet (%s) not found", d.Id())
|
||||||
d.SetId("")
|
d.SetId("")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue