Skip to content

Commit

Permalink
Delete wait logic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
SunithaGudisagarIBM1 authored and hkantare committed Jan 3, 2024
1 parent b579400 commit 160caa0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ibm/service/vpc/resource_ibm_is_vpn_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1027,9 +1027,9 @@ func isWaitForVPNServerDeleted(context context.Context, sess *vpcv1.VpcV1, d *sc
if response != nil && response.StatusCode == 404 {
return vpnServer, isVPNServerStatusDeleted, nil
}
return vpnServer, isVPNServerStatusDeleting, fmt.Errorf("The VPC route %s failed to delete: %s\n%s", d.Id(), err, response)
return vpnServer, *vpnServer.LifecycleState, fmt.Errorf("The VPC vpn server %s failed to delete: %s\n%s", d.Id(), err, response)
}
return vpnServer, isVPNServerStatusDeleting, nil
return vpnServer, *vpnServer.LifecycleState, nil

},
Timeout: d.Timeout(schema.TimeoutDelete),
Expand Down
4 changes: 2 additions & 2 deletions ibm/service/vpc/resource_ibm_is_vpn_server_route.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,9 +422,9 @@ func isWaitForVPNServerRouteDeleted(context context.Context, sess *vpcv1.VpcV1,
if response != nil && response.StatusCode == 404 {
return vpnServerRoute, isVPNServerRouteStatusDeleted, nil
}
return vpnServerRoute, isVPNServerRouteStatusDeleting, fmt.Errorf("The VPC route %s failed to delete: %s\n%s", d.Id(), err, response)
return vpnServerRoute, *vpnServerRoute.LifecycleState, fmt.Errorf("The VPC route %s failed to delete: %s\n%s", d.Id(), err, response)
}
return vpnServerRoute, isVPNServerRouteStatusDeleting, nil
return vpnServerRoute, *vpnServerRoute.LifecycleState, nil

},
Timeout: d.Timeout(schema.TimeoutDelete),
Expand Down

0 comments on commit 160caa0

Please sign in to comment.