I'm unable to create a Virtual network gateway with Basic SKU

network 20 Reputation points
2024-04-18T04:57:57.5766667+00:00

I'm Unable to create a Azure VPN gateway with Basic sku.

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,382 questions
0 comments No comments
{count} votes

Accepted answer
  1. TP 76,286 Reputation points
    2024-04-18T05:22:45.3333333+00:00

    Hi,

    Please test using sample code below. You can copy/paste it into PowerShell Azure Cloud Shell:

    $location = "westus3"
    $resourceGroup = "basic-vnet-gateway-group"
    $vnetAddressSpace = "10.20.0.0/16"
    $gatewaySubnet = "10.20.0.0/27"
    New-AzResourceGroup -Name $resourceGroup -Location $location
    $subnetConfig = New-AzVirtualNetworkSubnetConfig -Name GatewaySubnet -AddressPrefix $gatewaySubnet
    $vngwPIP = New-AzPublicIpAddress -Name myvngw-ip -ResourceGroupName $resourceGroup -Location $location -Sku Basic -AllocationMethod Dynamic
    $vnet = New-AzVirtualNetwork -Name myvngw-vnet -ResourceGroupName $resourceGroup -Location $location -AddressPrefix $vnetAddressSpace -Subnet $subnetConfig
    $subnet = Get-AzVirtualNetworkSubnetConfig -Name GatewaySubnet -VirtualNetwork $vnet
    $vngwIpConfig = New-AzVirtualNetworkGatewayIpConfig -Name vngwipconfig -SubnetId $subnet.Id -PublicIpAddressId $vngwPIP.Id
    New-AzVirtualNetworkGateway -Name myvngw-gw -ResourceGroupName $resourceGroup -Location $location -IpConfigurations $vngwIpConfig -GatewayType Vpn -VpnType RouteBased -GatewaySku Basic
    
    

    If you are still unable to create Basic SKU VPN gateway even using above code, please post precise error message.

    Please click Accept Answer and upvote if above was helpful.

    Thanks.

    -TP

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful