Downgrade Azure VPN Gateway to Basic

Allan Grafil 20 Reputation points
2023-11-15T04:15:12.93+00:00

Hi,

We had an Azure Migration POC and Microsoft provided us sponsorship. Results are positive but we want to cut some cost on the VPN Gateway since it cost at about $350 for about a month, we used the VPNGW2. We just want to know how to downgrade this to Basic tier. The Basic tier is not present on the dropdown.

Hope someone can help us on this.

Thanks in advance.

Allan G.

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,527 questions
Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
1,023 questions
{count} votes

Accepted answer
  1. TP 93,991 Reputation points
    2023-11-15T04:22:00.6533333+00:00

    Hi Allan,

    To downgrade you need to delete the existing gateway and create a new Basic VPN Gateway using PowerShell or CLI, with Basic SKU Public IP.

    Please see sample code below for creating Basic VPN Gateway.

    $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
    
    

    Please click Accept Answer and upvote if above was helpful.

    Thanks.

    -TP

    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.