Skip to content

Latest commit

 

History

History
 
 

vpn-vnet-2-vnet

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

How to create multiple VNet-to-VNet connection with two hub VNets

This ARM template creates multiple VNet-to-VNet connection by VPN Gateway. The intercommunication between VNets is based on IPsec tunnels.

The network configuration is reported in the diagram:

1

the ARM templates works with arrays:

  • vNetArray: it is an array wih all VNets, inclusive of Gatewaysubnet, VPN gateway name, ASN and SKU of VPN Gateway
  • vpnConnectionArray: includes the list of all connections. A single VNet2VNet is based on two connections:
    • connection for vnet1-to-vnet2
    • connection for vnet2-to-vnet1

Note

you can increase the number of VNets changing the structure of the arrays: vNetArray, vpnConnectionArray

[!Caveat] The ARM template might fail in the creation of connections. In this case you can easly fix it, removing the connection went in failure and than run again the same ARM template.

Before deploying the ARM template you should:

  • set the Azure subscription name in the file vnet2vnet-vpn.ps1
  • set the administrator username (parameter adminUsername) and password (paramenter adminPassword) in the file vnet2vnet-vpn.json