Skip to content

Commit

Permalink
Consider it successful to delete a non-existing FIP
Browse files Browse the repository at this point in the history
  • Loading branch information
odaira authored and hkantare committed Mar 11, 2020
1 parent 8ca261e commit 519ee54
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ibm/resource_ibm_is_floating_ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 519ee54

Please sign in to comment.