diff --git a/huaweicloud/resource_huaweicloud_ecs_instance_v1.go b/huaweicloud/resource_huaweicloud_ecs_instance_v1.go index dec5fa8605..6d809b0419 100644 --- a/huaweicloud/resource_huaweicloud_ecs_instance_v1.go +++ b/huaweicloud/resource_huaweicloud_ecs_instance_v1.go @@ -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)