Cannot delete a Virtual Network Gateway

董晉瑋(Andy.Dong) 25 Reputation points
2023-05-16T06:56:32.5466667+00:00

In the portal, the task to delete fails with this error message: The resource operation completed with terminal provisioning state 'Failed'.

Can't delete even with powershell

It's been two days since the error,

I can't use and can't delete but I'm charged.

User's image

User's image

Azure VPN Gateway
Azure VPN Gateway
An Azure service that enables the connection of on-premises networks to Azure through site-to-site virtual private networks.
{count} vote

Answer accepted by question author
  1. GitaraniSharma-MSFT 50,186 Reputation points Microsoft Employee Moderator
    2023-05-25T13:34:11.1+00:00

    @董晉瑋(Andy.Dong) ,

    I understand that you were unable to delete your Virtual Network gateway. In the portal, the task to delete was failing with following error message: "The resource operation completed with terminal provisioning state 'Failed'" and even PowerShell commands were not working.

    I suggested you try the below provided steps:

    • Open a web browser and navigate to https://resources.azure.com
    • Log-in to the appropriate Azure account.
    • In the blade on the left side of the browser, expand subscriptions, then expand the desired subscription name.
    • In the blade on the left side of the browser, expand resource groups.
    • Under resource groups, expand the proper Resource Group Name "eLife".
    • Under the Resource Group "eLife", expand providers.
    • Under providers, expand Microsoft.Network.
    • Under Microsoft.Network, expand virtualNetworkGateways, select the "elife-vpngateway" gateway.
    • Near the top of the content window of the browser, select the Read/Write push button.
    • Select the Data (GET, PUT) tab and click on GET.
    • Then click on Edit but do not make any changes.
    • Finally click on PUT.
    • This should help the VPN gateway to recover from the failed state.

    Post the above step:

    • Under Microsoft.Network, expand Connections.
    • Under Connections, check and see if you are able to find any connections.

    If you find a connection:

    • Select the Connection name and near the top of the content window of the browser, select the Read/Write push button.
    • Select the Actions (POST, DELETE) tab and click on Delete.
    • Once this connection is deleted, you can retry to delete the gateway.

    If you do not find a connection:

    • Under Microsoft.Network, expand virtualNetworkGateways, select the "elife-vpngateway" gateway and Select the Actions(POST, DELETE) tab and click on Delete.
    • Confirm that the gateway is deleted.

    You followed the above steps, but VPN gateway was not deleted, and the error still persisted. So, we created a support request to get it removed from the backend.

    The support engineer engaged the backend team and they have fixed the backend issue which was causing the VPN gateway deletion failure.

    So, I would request you try deleting the VPN gateway now.

    Kindly let us know if the above helps or you need further assistance on this issue.


    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.