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.