Unable to add new subnet in existing virtual network

Rishi Kesh Singh 175 Reputation points
2024-09-06T10:30:43.6633333+00:00

Hello,

I am adding a new subnet to the existing virtual network but it is showing below error message.

Failed to save subnet 'Subnet Name'. Error: 'Cannot proceed with operation because resource "/subscriptions/07145b12-0ef3-4d56-bc32-d7f44addf/resourceGroups/xyz/providers/Microsoft.Network/virtualNetworkGateways/xyz" used by resource "/subscriptions/07145b12-0ef3-4d56-bc32-d7f44addf/resourceGroups/Virtual network name/providers/Microsoft.Network/virtualNetworks/abc/subnets/abc" is not in Succeeded state. Resource is in Failed state and the last operation that updated /is updating the resource is PutVirtualNetworkGatewayOperation.'

Virtual Network range is : 10.2.0.0/21 multiple subnets are created.

Subnet is already created

10.2.3.0/27

I have tried to add the new subnet mentioned (tried both) below but failed and showing above mentioned error.

10.2.3.32/27

10.2.3.32/28

Can anyone help us why getting this error?

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

Accepted answer
  1. KapilAnanth-MSFT 49,536 Reputation points Microsoft Employee Moderator
    2024-09-09T06:33:37.6+00:00

    @Rishi Singh ,

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.

    I understand that you are unable to add a subnet to a VNET.

    From your error message, it appears,

    • There is a VPN Gateway "xyz" deployed into the VNET
    • And this VPN Gateway is in a failed state

    As next steps,

    • You have to first bring the VPN Gateway to a succeeded state
    • You can do this by doing a GET and SET Operation on the VPN Gateway, with some minor changes (which you can revert back)
    $Gateway = Get-AzVirtualNetworkGateway -ResourceGroupName "<ResourceGroupName>" -Name "<VPNGatewayName>"
    Set-AzVirtualNetworkGateway -VirtualNetworkGateway $Gateway -Tag @{ testtagKey="SomeTagKey"; testtagValue="SomeKeyValue" }
    
    
    

    The above example adds a tag which you can later remove, once the VPN Gateway goes into a Succeeded state.

    Post which, you should be able to add a subnet to the VNET

    Kindly let us know how this goes and if you need further assistance on this issue.

    Thanks,

    Kapil

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.