Skip to content

High Bandwidth VPNGW changes #27322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,13 @@ public void TestVirtualNetworkExpressRouteGatewayCRUDwithResiliencyModel()

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
[Trait(Category.Owner, NrpTeamAlias.brooklynft)]
public void TestHighBandwidthVpnGatewayCreation()
{
TestRunner.RunTestScript("Test-HighBandwidthVpnGatewayCreation");
}

[Fact]
[Trait(Category.Owner, NrpTeamAlias.brooklynft_subset3)]
public void TestVirtualNetworkGatewayMigrationFromBasicIPToSatndardIP()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1801,6 +1801,81 @@ function Test-VirtualNetworkExpressRouteGatewayCRUDwithResiliencyModel
}
}

<#
.SYNOPSIS
High Bandwidth Vpn gateway creation test
#>
function Test-HighBandwidthVpnGatewayCreation
{
# Setup
$rgname = Get-ResourceGroupName
$ergwName = Get-ResourceName
$vnetName = Get-ResourceName
$publicIpName = Get-ResourceName
$erIpConfigName = Get-ResourceName
$resourceTypeParent = "Microsoft.Network/virtualNetworkGateways"
$location = "West Central US"
$erConnName = Get-ResourceName
$publicIpName3 = Get-ResourceName
$publicIpName4 = Get-ResourceName
$vpnGatewayName = Get-ResourceName
$sku = "VpnGw5"
$vpngwConfigName1 = Get-ResourceName
$vpngwConfigName2 = Get-ResourceName

try
{
# Create the resource group
$resourceGroup = New-AzResourceGroup -Name $rgname -Location $location -Tags @{ testtag = "PS testing" }

# Create the Virtual Network
$subnet = New-AzVirtualNetworkSubnetConfig -Name "GatewaySubnet" -AddressPrefix 10.0.0.0/24
$vnet = New-AzVirtualNetwork -Name $vnetName -ResourceGroupName $rgname -Location $location -AddressPrefix 10.0.0.0/16 -Subnet $subnet
$vnet = Get-AzVirtualNetwork -Name $vnetName -ResourceGroupName $rgname
$subnet = Get-AzVirtualNetworkSubnetConfig -Name "GatewaySubnet" -VirtualNetwork $vnet

# Create the publicip
$publicip = New-AzPublicIpAddress -ResourceGroupName $rgname -name $publicIpName -location $location -AllocationMethod Static -Sku Standard

# Create ipconfig
$vnetIpConfig = New-AzVirtualNetworkGatewayIpConfig -Name $erIpConfigName -PublicIpAddress $publicip -Subnet $subnet

# Create ExpressRoute gateway
$expected = New-AzVirtualNetworkGateway -ResourceGroupName $rgname -name $ergwName -location $location -IpConfigurations $vnetIpConfig -GatewayType ExpressRoute -GatewaySku UltraPerformance
$erGateway = Get-AzVirtualNetworkGateway -ResourceGroupName $rgname -name $ergwName
Assert-NotNull $erGateway

# Get Circuit
$circuit = Get-AzExpressRouteCircuit -Name "er-ckt-231"
Assert-AreEqual 1 @($circuit).Count

# Create & Get VirtualNetworkGatewayConnection
$conn = New-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $erConnName -location $location -VirtualNetworkGateway1 $erGateway -ConnectionType ExpressRoute -RoutingWeight 3 -PeerId $circuit.Id -ExpressRouteGatewayBypass -EnablePrivateLinkFastPath
$erConn = Get-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $erConnName
Assert-NotNull $erConn

$publicIP1 = New-AzPublicIpAddress -ResourceGroupName $rgname -Location $location -Name $publicIpName3 -AllocationMethod Static -Sku Standard
$publicIP2 = New-AzPublicIpAddress -ResourceGroupName $rgname -Location $location -Name $publicIpName4 -AllocationMethod Static -Sku Standard

# Create Gateway IP Configurations
$gwIpConfig1 = New-AzVirtualNetworkGatewayIpConfig -Name $vpngwConfigName1 -Subnet $subnet -PublicIpAddress $publicIP1
$gwIpConfig2 = New-AzVirtualNetworkGatewayIpConfig -Name $vpngwConfigName2 -Subnet $subnet -PublicIpAddress $publicIP2

# Create high bandwidth VPN Gateway
$vpnGateway = New-AzVirtualNetworkGateway -Name $vpnGatewayName -ResourceGroupName $rgname -Location $location -IpConfigurations $gwIpConfig1, $gwIpConfig2 -GatewayType Vpn -VpnType RouteBased -EnableActiveActiveFeature -EnableAdvancedConnectivity -GatewaySku $sku

$gateway = Get-AzVirtualNetworkGateway -Name $vpnGatewayName -ResourceGroupName $rgname
Assert-NotNull $vpnGateway
Assert-NotNull $vpnGateway.EnableAdvancedConnectivity
Assert-AreEqual $vpnGateway.EnableAdvancedConnectivity true
}
finally
{
# Cleanup
Remove-AzResourceGroup $rgname
}
}

<#
.SYNOPSIS
Virtual network gateway migration from basic ip to standard ip tesr
Expand Down
Loading