From 519ee54c5073acddb45e93c2ec62904aac3ff76d Mon Sep 17 00:00:00 2001 From: Rei Odaira Date: Thu, 5 Mar 2020 17:31:49 -0600 Subject: [PATCH] Consider it successful to delete a non-existing FIP --- ibm/resource_ibm_is_floating_ip.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ibm/resource_ibm_is_floating_ip.go b/ibm/resource_ibm_is_floating_ip.go index 8c6010a216..f2f8ba6e14 100644 --- a/ibm/resource_ibm_is_floating_ip.go +++ b/ibm/resource_ibm_is_floating_ip.go @@ -281,6 +281,13 @@ func resourceIBMISFloatingIPDelete(d *schema.ResourceData, meta interface{}) err err = floatingipC.Delete(d.Id()) if err != nil { + iserror, ok := err.(iserrors.RiaasError) + if ok { + if len(iserror.Payload.Errors) == 1 && + iserror.Payload.Errors[0].Code == "service_error" { + return nil + } + } return err }