ββββ βββββββββββββββββββββββ βββ βββββββ βββββββ βββ βββ
βββββ βββββββββββββββββββββββ βββββββββββββββββββββββ ββββ
ββββββ βββββββββ βββ βββ ββ ββββββ ββββββββββββββββββ
ββββββββββββββββ βββ βββββββββββββ ββββββββββββββββββ
βββ ββββββββββββββ βββ ββββββββββββββββββββββ ββββββ βββ
βββ βββββββββββββ βββ ββββββββ βββββββ βββ ββββββ βββ
__ ___ ____
/ / / | / __ )
/ / / /| | / __ |
/ /___/ ___ |/ /_/ /
/_____/_/ |_/_____/
A Z U R E N E T W O R K L A B
βοΈ AZURE NETWORK LAB βοΈ
ββββββββββββββββββββββββββββββββββββ
β [ VIRTUAL WAN ] β
β π₯ Firewall π VPN β
ββββββ¦βββββββββββββββββββ¦βββββββββββ
β β
βββββββ©βββββ βββββββ©βββββ
β SPOKE1 β β SPOKE2 β
βRoute Srv β β vHub β
ββββββββββββ ββββββββββββ
Learn Azure networking the right wayβby building it. This Terraform project deploys a complete vWAN-centric networking environment you can explore, break, and rebuild. Covers Virtual WAN, Secured Hub, VPN connectivity, Route Server, and spoke networks following Microsoft best practices.
π‘ Hands-on Learning: Deploy real enterprise network infrastructure in minutes. Perfect for AZ-700 certification prep, team training, or validating network architectures before production.
The lab is driven by the deploy object in terraform.tfvars. Flip the flags to change the footprint, then run terraform plan and terraform apply.
Note: When
deploy.route_server = true, Spoke1 is not connected to vHub (Azure limitation).
- Overview
- Documentation
- Architecture Diagram
- What Gets Deployed
- Network Topology
- Quick Start
- Feature Toggles
- Configuration Options
- Cost Estimation
- Project Structure
- License
This lab deploys a Virtual WAN-centric architecture with:
| Component | Purpose |
|---|---|
| Virtual WAN + Hub | Global transit connectivity |
| Secured Hub (Azure Firewall) | Centralized security inspection |
| vHub VPN Gateway | Branch connectivity |
| Spoke VNets | Workload isolation |
| Route Server | BGP route injection |
| Simulated On-Premises | VPN testing |
The full wiki lives in wiki/ and mirrors the style of the Azure Landing Zone lab.
- Start here:
wiki/README.md - Deep dive guide:
wiki/book.md - Architecture:
wiki/architecture/overview.md - Scenarios:
wiki/scenarios/README.md - Testing:
wiki/testing/lab-testing-guide.md
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β VIRTUAL WAN β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β VIRTUAL HUB (10.10.0.0/23) ββ
β β βββββββββββββββ βββββββββββββββ βββββββββββββββ ββ
β β β Azure β β vHub VPN β β Route β ββ
β β β Firewall β β Gateway β β Tables β ββ
β β β (Secured) β β (BGP) β β β ββ
β β ββββββββ¬βββββββ ββββββββ¬βββββββ βββββββββββββββ ββ
β β β β ββ
β βββββββββββΌβββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββ
β β β β
ββββββββββββββΌβββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββ
β β
ββββββββββ΄βββββββββ β βββββββββββββββββββββββββββ
β β β β β
βΌ βΌ βΌ βΌ β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ β
β SPOKE 1 β β SPOKE 2 β β ON-PREM β β
β 10.1.0.0/16 β β 10.2.0.0/16 β β 192.168.0.0/16 β β
β β β β β β β
β βββββββββββββββ β β βββββββββββββββ β β βββββββββββββββ β β
β βRoute Server β β β β Workload VM β β β β VPN Gateway βββΌββββββββ
β β (BGP) β β β βββββββββββββββ β β β (BGP) β β S2S VPN
β ββββββββ¬βββββββ β β β β βββββββββββββββ β
β β β β vHub Connected β β β
β ββββββββΌβββββββ β β β β βββββββββββββββ β
β β NVA (RRAS) β β β β β β NVA (RRAS) β β
β β ASN 65501 β β β β β βββββββββββββββ β
β βββββββββββββββ β β β β β
β β β β β βββββββββββββββ β
β βββββββββββββββ β β β β β Workload VM β β
β βWorkload VMs β β β β β βββββββββββββββ β
β β (LB Pool) β β β β β β
β βββββββββββββββ β β β β β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
Route Server vHub Connected VPN S2S to vHub
(No vHub Conn)
| Resource | Name | Purpose |
|---|---|---|
| Resource Group | rg-az700-lab |
Container for all resources |
| Virtual WAN | vwan-az700-lab |
Global WAN fabric |
| Virtual Hub | vhub-az700-lab |
Regional hub (10.10.0.0/23) |
| Azure Firewall | fw-vhub-az700-lab |
Secured Hub with firewall |
| vHub VPN Gateway | vpngw-vhub-az700-lab |
Branch VPN termination |
| VNet | Address Space | Purpose |
|---|---|---|
| Spoke1 | 10.1.0.0/16 | Route Server + NVA testing |
| Spoke2 | 10.2.0.0/16 | Standard vHub connectivity |
| OnPrem | 192.168.0.0/16 | Simulated on-premises |
| VM | Location | Purpose |
|---|---|---|
| vm-spoke1-1 | Spoke1 | Workload (LB backend) |
| vm-spoke1-2 | Spoke1 | Workload (LB backend) |
| vm-spoke1-nva | Spoke1 | RRAS NVA for Route Server BGP |
| vm-spoke2-1 | Spoke2 | Workload |
| vm-onprem-1 | OnPrem | Simulated on-prem workload |
| vm-onprem-nva | OnPrem | RRAS NVA |
| Component | Variable | Default |
|---|---|---|
| Azure Bastion | deploy.bastion |
false |
| Application Gateway (WAF) | deploy.application_gateway |
false |
| DNS Private Resolver | deploy.dns_resolver |
true |
| NAT Gateway | deploy.nat_gateway |
true |
| Route Server | deploy.route_server |
true |
| Network | CIDR | Purpose |
|---|---|---|
| Virtual Hub | 10.10.0.0/23 | vWAN Hub |
| Spoke 1 | 10.1.0.0/16 | Route Server testing |
| ββ Workload | 10.1.1.0/24 | VMs |
| ββ NvaSubnet | 10.1.8.0/24 | NVA (10.1.8.10) |
| ββ RouteServerSubnet | 10.1.7.0/27 | Route Server |
| ββ Other subnets | 10.1.x.0/24 | LB, AppGw, PE, DNS, Bastion |
| Spoke 2 | 10.2.0.0/16 | vHub connected |
| ββ Workload | 10.2.1.0/24 | VMs |
| On-Premises | 192.168.0.0/16 | Simulated on-prem |
| ββ Default | 192.168.1.0/24 | VMs |
| ββ NvaSubnet | 192.168.2.0/24 | NVA (192.168.2.10) |
| ββ GatewaySubnet | 192.168.0.0/27 | VPN Gateway |
- Azure subscription with Owner or Contributor rights
- Terraform 1.9 or later
- Azure CLI signed in (
az login)
# Clone the repository
git clone https://github.com/Jamonygr/azure-network-lab.git
cd azure-network-lab
# Copy and edit variables
cp terraform.tfvars.example terraform.tfvars
# Edit terraform.tfvars with your values
# Initialize and deploy
terraform init
terraform plan -out=tfplan
terraform apply tfplanterraform destroy -auto-approveControl what gets deployed to optimize costs:
# terraform.tfvars
# Feature Toggles
deploy = {
vwan = true # Virtual WAN
vhub_firewall = true # Azure Firewall in vHub (~$912/mo)
vpn = false # VPN Gateways (vHub + OnPrem)
route_server = true # Azure Route Server (~$360/mo)
dns_resolver = true # DNS Private Resolver (~$180/mo)
private_dns_zones = true # Private DNS Zones
bastion = false # Azure Bastion (~$140/mo)
application_gateway = false # WAF v2 (~$250/mo)
load_balancer = true # Internal Load Balancer
nat_gateway = true # NAT Gateway (~$45/mo)
private_endpoint = true # Storage Account + Private Endpoint
spoke1_vms = true # VMs in Spoke1 VNet
spoke2_vms = true # VMs in Spoke2 VNet
onprem_vms = false # VMs in OnPrem VNet
nvas = true # Network Virtual Appliances (RRAS/BGP)
}Note: When
deploy.route_server = true, Spoke1 does NOT connect to vHub (Azure limitation: VNet cannot have both Route Server and vHub remote gateway).
# terraform.tfvars
# Required
subscription_id = "your-subscription-id"
admin_username = "azureadmin"
admin_password = "YourSecureP@ssw0rd!"
vpn_shared_key = "YourVPNSharedKey123!"
# Optional
ctx = {
project = "az700-lab"
location = "eastus2"
tags = {
Environment = "lab"
Project = "az700"
}
}
vm_size = "Standard_B2s"# Address Spaces
vhub_address_prefix = "10.10.0.0/23"
spoke1_address_space = ["10.1.0.0/16"]
spoke2_address_space = ["10.2.0.0/16"]
onprem_address_space = ["192.168.0.0/16"]| Component | Estimated Cost | Notes |
|---|---|---|
| Azure Firewall (Standard) | ~$350/mo | Always on |
| vHub VPN Gateway | ~$140/mo | Scale unit 1 |
| OnPrem VPN Gateway (VpnGw1) | ~$140/mo | For S2S VPN |
| Route Server | ~$360/mo | Optional |
| Application Gateway (WAF_v2) | ~$250/mo | Optional |
| DNS Private Resolver | ~$180/mo | Optional |
| NAT Gateway | ~$45/mo | Optional |
| Azure Bastion (Basic) | ~$140/mo | Optional |
| VMs (6x Standard_B2s) | ~$150/mo | Windows Server Core |
| Storage, IPs, etc. | ~$50/mo | Miscellaneous |
| Profile | Components | Est. Monthly |
|---|---|---|
| Minimal | vWAN + Firewall + VPN + VMs | ~$800 |
| Standard | + Route Server + NAT + DNS | ~$1,400 |
| Full | + AppGw + Bastion | ~$1,800 |
azure-network-lab/
βββ README.md # This documentation
βββ LICENSE # MIT License
βββ main.tf # Root orchestration (lab only)
βββ variables.tf # Input variables
βββ outputs.tf # Output values
βββ locals.tf # Computed locals
βββ moved.tf # State move declarations
βββ providers.tf # Provider configuration
βββ terraform.tfvars # Your configuration (gitignored)
βββ terraform.tfvars.example # Example configuration
βββ wiki/ # Documentation wiki
β
βββ modules/ # Reusable modules
βββ application-gateway/
βββ bastion/
βββ dns-private-resolver/
βββ load-balancer/
βββ local-network-gateway/
βββ log-analytics/
βββ nat-gateway/
βββ nsg/
βββ private-dns-zone/
βββ private-endpoint/
βββ resource-group/
βββ route-server/
βββ storage-account/
βββ tags/
βββ vhub/
βββ vhub-connection/
βββ vhub-firewall/
βββ vhub-vpn-gateway/
βββ vm-windows/
βββ vm-windows-nva/
βββ vnet/
βββ vnet-peering/
βββ vpn-connection/
βββ vpn-gateway/
βββ vpn-site/
βββ vwan/
| Phase | Components |
|---|---|
| 1. Foundation | Resource Group, Log Analytics |
| 2. vWAN Core | vWAN, vHub, Firewall, VPN Gateway |
| 3. Virtual Networks | Spoke1, Spoke2, OnPrem VNets |
| 4. NSGs | Network Security Groups |
| 5. vHub Connections | Spoke connections to hub |
| 6. VPN Infrastructure | OnPrem VPN, Site, Connection |
| 7. Route Server | Optional Route Server |
| 8. DNS | Private DNS Zones, Resolver |
| 9. Compute Support | LB, App GW, NAT GW, Bastion |
| 10. Private Endpoints | Storage, PE |
| 11. VMs | Workload VMs |
| 12. NVAs | RRAS Network Virtual Appliances |
This environment supports the following AZ-700 exam topics:
| Scenario | Components Used |
|---|---|
| Virtual WAN Configuration | vWAN, vHub, Hub Connections |
| Secured Virtual Hub | Azure Firewall in vHub |
| VPN Site-to-Site | vHub VPN GW, OnPrem VPN GW, VPN Site |
| BGP Routing | VPN with BGP, Route Server |
| Route Server + NVA | Route Server, RRAS NVA, BGP Peering |
| Private DNS | Private DNS Zones, VNet Links |
| Private Endpoints | Storage PE, Private DNS Integration |
| Load Balancing | Internal Load Balancer |
| Application Gateway | WAF v2 |
| DNS Resolution | DNS Private Resolver |
This project is licensed under the MIT License - see the LICENSE file for details.
Built with β€οΈ for learning Azure networking
Last Updated: December 2024