Skip to content

Commit

Permalink
Fix ecs instance delete issue (#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
niuzhenguo authored Mar 18, 2020
1 parent 4f4da60 commit 4b63161
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions huaweicloud/resource_huaweicloud_ecs_instance_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,10 @@ func resourceEcsInstanceV1Read(d *schema.ResourceData, meta interface{}) error {
if err != nil {
return CheckDeleted(d, err, "server")
}
if server.Status == "DELETED" {
d.SetId("")
return nil
}

log.Printf("[DEBUG] Retrieved Server %s: %+v", d.Id(), server)

Expand Down

0 comments on commit 4b63161

Please sign in to comment.