I've deleted virtual gateway subnet but Azure still thinks it exist and I continue to get the below error message. The virtual network already has a gateway of this type or the existing gateway in the virtual network does not support coexistence.

Chap 0 Reputation points
2025-03-22T20:06:17.29+00:00

I've deleted virtual gateway subnet but Azure still thinks it exist and I continue to get the below error message.

The virtual network already has a gateway of this type or the existing gateway in the virtual network does not support coexistence.

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,792 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sai Prasanna Sinde 6,645 Reputation points Microsoft External Staff Moderator
    2025-03-24T05:50:32.6833333+00:00

    Hi @Chap

    Sometimes, using the Azure CLI can provide more accurate information and force a refresh of the Azure state, please use the below AZ CLI command:

    az network vnet subnet list --resource-group <resource-group-name> --vnet-name <vnet-name>
    

    Verify that the subnet is indeed gone from the list or if the subnet is still listed, try to delete it again using the CLI by following the below command:

    az network vnet subnet delete --resource-group <resource-group-name> --vnet-name <vnet-name> --name <subnet-name>
    

    ARM locks can prevent resource deletion. Check if there are any locks on the virtual network or the subnet level by following the below command:

    az lock list --resource-group <resource-group-name>
    

    If you find any locks, remove them using the CLI the below command:

    az lock delete --ids <lock-resource-id>
    

    Additionally, please try clearing your browser cache, history, and cookies. Alternatively, you can use a different browser and log out of the Azure portal, then log back in and reproduce the issue.

    Note: Kindly try to check other subnets within the Virtual network, which might contain the Azure Virtual Network Gateway.


    I hope this has been helpful!

    Your feedback is important so please take a moment to accept answers.

    If you still have questions, please let us know what is needed in the comments so the question can be answered.

    0 comments No comments

Your answer

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