From 9148b7e7642d24881998aec30e7d9e20649c6977 Mon Sep 17 00:00:00 2001 From: Zhenguo Niu Date: Wed, 8 Jul 2020 04:27:32 +0000 Subject: [PATCH] Ignore eip unbind error during deleting Instead of raising error when unbinding eip, this logs a warning. --- huaweicloud/resource_huaweicloud_vpc_eip_v1.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/huaweicloud/resource_huaweicloud_vpc_eip_v1.go b/huaweicloud/resource_huaweicloud_vpc_eip_v1.go index 75e6950519..1ba03d9c4a 100644 --- a/huaweicloud/resource_huaweicloud_vpc_eip_v1.go +++ b/huaweicloud/resource_huaweicloud_vpc_eip_v1.go @@ -233,7 +233,6 @@ func resourceVpcEIPV1Update(d *schema.ResourceData, meta interface{}) error { if err != nil { return fmt.Errorf("Error updating publicip: %s", err) } - } return resourceVpcEIPV1Read(d, meta) @@ -249,7 +248,7 @@ func resourceVpcEIPV1Delete(d *schema.ResourceData, meta interface{}) error { timeout := d.Timeout(schema.TimeoutDelete) err = unbindToPort(d, d.Id(), networkingClient, timeout) if err != nil { - return fmt.Errorf("Error unbinding eip:%s to port: %s", d.Id(), err) + log.Printf("[WARN] Error trying to unbind eip %s :%s", d.Id(), err) } stateConf := &resource.StateChangeConf{