Unable to delete Azure VPN gateway

rwh202 20 Reputation points
2026-06-11T15:33:25.5433333+00:00

Since removing the basic IP address from our basic VPN gateway, it has been borked.

I've been able to set up a shiny new Standard VPN on a different VNET, so not interested in fixing it but I need to delete the old gateway - this fails in the portal, and azure CLI with no helpful message or log:

  • Error code: ResourceOperationFailure
  • Message: The resource operation completed with terminal provisioning state 'Failed'.

Tried the proposed solution here, but no option to delete:

https://learn.microsoft.com/en-us/answers/questions/1285753/cannot-delete-a-virtual-network-gateway

It needs a backend kick please.

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.


Answer accepted by question author
Vallepu Venkateswarlu 10,595 Reputation points Microsoft External Staff Moderator
2026-06-24T10:06:15.22+00:00

Hi @ rwh202,

As discussed, the backend team has confirmed that the stuck operation has been cleared. Please proceed with deleting the VPN Gateway.

As per your confirmation, the VPN Gateway has now been successfully deleted.

Since the issue has been resolved, please let us know if you need any further assistance.

Please210246-screenshot-2021-12-10-121802.pngand “up-vote” wherever the information provided helps you, **this can be beneficial to other community members.

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

2 additional answers

Sort by: Oldest
  1. Brian Betsill 20 Reputation points
    2026-06-19T04:11:19.8833333+00:00

    I had this same issue and found that it was due to the P2S connection had an outdated root cert on file. I deleted the outdated cert and it let me remove the basic IP address.

    Was this answer helpful?


  2. SUNOJ KUMAR YELURU 18,736 Reputation points MVP Volunteer Moderator
    2026-06-20T07:52:04.3866667+00:00

    Hello @rwh202,

    Thank you for reaching out Q&A forum.

    When you encounter a ResourceOperationFailure error with a terminal provisioning state of ‘Failed’ while trying to delete a VPN gateway in Azure, it typically indicates that there are issues with the resource that prevent it from being deleted. Here are some steps you can take to resolve this:

    1. Check Dependencies: Ensure that there are no existing connections or dependencies tied to the VPN gateway. You may need to remove any connections to the virtual network gateway before attempting to delete it.
    2. Use PowerShell or Azure CLI: If the Azure portal is not allowing you to delete the gateway, you can try using PowerShell or Azure CLI commands to force the deletion. The command to delete a site-to-site VPN gateway using PowerShell is:
         Remove-AzVirtualNetworkGateway -Name "YourGatewayName" -ResourceGroupName "YourResourceGroupName"
      
      Make sure to replace YourGatewayName and YourResourceGroupName with your actual gateway and resource group names.
    3. Check for Locks: Verify if there are any resource locks applied to the VPN gateway that might be preventing its deletion. You can check this in the Azure portal under the resource’s settings.

    If this answers your query, do click Accept Answer and Up-Vote for the same. And, if you have any further query do let us know.

    Was this answer helpful?

    0 comments No comments

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.