Azure: Cannot delete a Virtual Network Gateway

Isaac Dontje Lindell 1 Reputation point
2021-08-28T16:39:22.67+00:00

I created a Virtual Network Gateway this morning, but wasn't clear on the configuration, so decided to delete it and (eventually) start over. But, I don't seem to be able to delete it from either the portal or Powershell.

At some point while I was trying to clean it up, the resource has ended up in the "failed" provisioning state, but I can't find any information about why.

There are no connections associated with this gateway.

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

Using Powershell, I get this:

> Remove-AzVirtualNetworkGateway -Verbose -Name "<redacted>" -ResourceGroupName "<redacted>"

VERBOSE: Performing the operation "Removing resource ..." on target "<redacted>".

Confirm
Are you sure you want to remove resource '<redacted>'
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): Y
Remove-AzVirtualNetworkGateway: Long running operation failed with status 'Failed'. Additional Info:'An error occurred.'StatusCode: 200
ReasonPhrase: OK
Status: Failed
ErrorCode: InternalServerError
ErrorMessage: An error occurred.

What am I doing wrong? I just need to delete this resource, but the error message provides absolutely no useful information.

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.
1,461 questions
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,311 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. suvasara-MSFT 10,036 Reputation points
    2021-08-28T17:49:55.117+00:00

    @Isaac Dontje Lindell , Apologies for the inconvenience caused. I would seek collaboration from our backend team to troubleshoot this issue further. Please do reach us at azcommunity@microsoft.com along with your subscription details for deeper investigation.

    ----------

    Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.