Unable to delete a orphaned VPN gateway
I have a VPN gateway which is failed state since it doesn't have any virtual hub attached with it.
ubuntu@ip-172-31-19-1:~$ az network vpn-gateway show \
-g QA_Aug \
-n mcn-vpngw-sc-qcrn9z-japaneast \
--query "{name:name,location:location,state:provisioningState,hub:virtualHub.id}" \
-o json
{
"hub": null,
"location": "japaneast",
"name": "mcn-vpngw-sc-qcrn9z-japaneast",
"state": "Failed"
}
So, i have created a hub in the same region to attach the orphaned VPN to it, but when i try to attach it with the Hub I am getting InternalServerError.
ubuntu@ip-172-31-19-1:~$ az network vhub show -g QA_Aug -n new-hub --query "{name:name,location:location,state:provisioningState,id:id}" -o json {
"id": "/subscriptions/e3de723e-e527-4610-85a4-87a3b1d7a37c/resourceGroups/QA_Aug/providers/Microsoft.Network/virtualHubs/new-hub",
"location": "japaneast",
"name": "new-hub",
"state": "Succeeded"
}
ubuntu@ip-172-31-19-1:~$ az network vpn-gateway update \
-g QA_Aug \
-n mcn-vpngw-sc-qcrn9z-japaneast \
--vhub "/subscriptions/e3de723e-e527-4610-85a4-87a3b1d7a37c/resourceGroups/QA_Aug/providers/Microsoft.Network/virtualHubs/new-hub"
(InternalServerError) An error occurred.
Code: InternalServerError
Message: An error occurred.
Now I am neither able to delete the VPN gateway nor make it provisioned success. How this VPN can be deleted from the subscription?