Tuesday, June 30, 2020

Azure Virtual WAN using Terraform

Reference Architecture

Azure Virtual WAN Using Terraform
Azure Virtual WAN POC using Terraform

Summary

This post is inspired by one of my recent partner engagements where we built an Azure Virtual WAN POC environment using Terraform. This is a quick way to demonstrate any-to-any connectivity and traffic flows. With a simple P2S gateway you could validate all the flows with one click deployment using terraform.

This can be used as a seeding architecture for more complex scenarios including branch office and ExpressRoute connectivity using VPN Gateway, ExpressRoute gateway and  full eco-system of partner SD-WAN/VPN devices.

Azure Documentation

We have  phenomenal documentation, diagrams and use cases in Azure documentation.

General Virtual WAN documentation here
P2S Client Setup documentation here.

Github Repo:

Link to my github repo is here.   This code sample will build the above architecture
https://github.com/nehalineogi/vwan-terraform

Prerequisites

git
terraform

Deploying vWAN POC using Terraform

git clone the repository and run the following commands

# setup
terraform init
terraform plan
terraform apply  (this could take upto 45 minutes as it will deploy  P2S Gateways for both regions)
# to cleanup
terraform destroy


Running the tests


End Users need to follow the following steps:


1. Make sure that the following certificates are in the correct location:
TABLE 1
CertificateLocation
mydomain.com.pfxCurrent User\Personal\Certificates
rootCA.crtLocal Computer\Trusted Root Certification Authorities


2.  Download and install the VPN Client from Azure Portal.
Azure user VPN Profile Download


3. Install the VPN Client using the instructions here.
  • Select the VPN client configuration files that correspond to the architecture of the Windows computer. For a 64-bit processor architecture, choose the 'VpnClientSetupAmd64' installer package. For a 32-bit processor architecture, choose the 'VpnClientSetupX86' installer package.
  • Double-click the package to install it. If you see a SmartScreen popup, click More info, then Run anyway.
4. After the p2s client is connected:
ipconfig (should get an ip from the P2S subnets 192.168.51.0/24 or 192.168.52.0.24)


ping 10.1.1.4
ping 10.2.1.4
ping 10.3.1.4
ping 10.4.1.4

Note: VPN troubleshooting link here