Skip to main content
Version: Next

Task 02: VPN Gateway

Runbook Azure

DOCUMENT CATEGORY: Runbook SCOPE: VPN Gateway deployment PURPOSE: Create VPN Gateway for hybrid connectivity MASTER REFERENCE: Microsoft Learn - VPN Gateway

Status: Active


Overview

This task deploys an Azure VPN Gateway into the GatewaySubnet created in Task 01. The gateway provides site-to-site IPsec/IKEv2 connectivity between Azure and on-premises infrastructure with BGP routing support.

Deployment Time

The VPN Gateway takes 30–45 minutes to deploy. Do not interrupt the deployment. Plan accordingly.

Task Classification

Execution Target: Azure-Only (control-plane API operation) Tab Profile: 3 tabs — Azure Portal · Azure CLI / PowerShell · Standalone Script

Terraform Reference

Module: azurelocal-toolkit File: network.tf Mode: Management

Components Created

ResourceName PatternPurpose
Public IPpip-azrlvpng-{env}-{region}-01VPN Gateway public IP
VPN Gatewayvpng-azrl-{env}-{region}-01Site-to-site VPN termination

Gateway Configuration

SettingValueSource
SKUVpnGw2AZnetwork.vpn.azure_gateway.sku
GenerationGeneration2network.vpn.azure_gateway.generation
TypeRoute-basedStandard for Azure Local
Active-ActivePer confignetwork.vpn.azure_gateway.active_active
BGP EnabledPer confignetwork.vpn.azure_gateway.bgp.enabled
BGP ASNPer confignetwork.vpn.azure_gateway.bgp.asn

Prerequisites

  • Task 01: Virtual Network completed — GatewaySubnet exists
  • Public IP address not already in use
  • BGP ASN confirmed by on-premises network team (must not conflict)

Variables from variables.yml

VariableConfig PathExample (IIC)
Subscription IDazure.subscriptions.<name>.id(per environment)
Resource Groupnetwork.vpn.azure_gateway.resource_grouprg-azrlmgmt-azl-eus-01
VPN Gateway Namenetwork.vpn.azure_gateway.namevpng-azrl-azl-eus-01
Public IP Namenetwork.vpn.azure_gateway.public_ippip-azrlvpng-azl-eus-01
SKUnetwork.vpn.azure_gateway.skuVpnGw2AZ
Generationnetwork.vpn.azure_gateway.generationGeneration2
BGP Enablednetwork.vpn.azure_gateway.bgp.enabledtrue
BGP ASNnetwork.vpn.azure_gateway.bgp.asn65515

Single Subscription Model

Landing Zone Placement

FieldValueConfig Path
SubscriptionCustomer subscriptionazure.subscriptions.<name>.id
Resource Grouprg-azrlmgmt-{env}-{region}-01network.vpn.azure_gateway.resource_group
VPN Gateway Namevpng-azrl-{env}-{region}-01network.vpn.azure_gateway.name
Public IP Namepip-azrlvpng-{env}-{region}-01network.vpn.azure_gateway.public_ip

Execution Options

Azure Portal

When to use: Learning Azure Local, single deployment, prefer visual interface

Procedure

  1. Create Public IP:
  • Search for Public IP addresses+ Create | Field | Value | Source | |-------|-------|--------| | Name | pip-azrlvpng-{env}-{region}-01 | network.vpn.azure_gateway.public_ip | | SKU | Standard | Required for AZ gateway | | Assignment | Static | Required for VPN Gateway | | Availability Zone | Zone-redundant | Best practice |
  1. Create VPN Gateway:
  • Search for Virtual network gateways+ Create | Field | Value | Source | |-------|-------|--------| | Name | vpng-azrl-{env}-{region}-01 | network.vpn.azure_gateway.name | | Region | Your region | network.vpn.azure_gateway.resource_group | | Gateway type | VPN | — | | SKU | VpnGw2AZ | network.vpn.azure_gateway.sku | | Generation | Generation2 | network.vpn.azure_gateway.generation | | Virtual network | VNet from Task 01 | network.azure_vnets.management.name | | Public IP | Public IP created above | network.vpn.azure_gateway.public_ip | | Enable active-active | Per config | network.vpn.azure_gateway.active_active |
  1. Configure BGP (if enabled): | Field | Value | Source | |-------|-------|--------| | Configure BGP | Yes | network.vpn.azure_gateway.bgp.enabled | | ASN | Per config | network.vpn.azure_gateway.bgp.asn | | Custom Azure APIPA BGP address | Per config | network.vpn.azure_gateway.bgp.custom_apipa_bgp_address |

  2. Review + create: Verify → Click Create → Wait 30–45 minutes

Validation

  • VPN Gateway provisioning state shows Succeeded
  • Public IP assigned and visible
  • BGP settings correct (if enabled)
  • Gateway associated with correct GatewaySubnet

Validation

  • VPN Gateway provisioning state is Succeeded
  • Public IP assigned
  • Gateway SKU matches config
  • BGP ASN correct (if enabled)

CAF/WAF Landing Zone Model

In the CAF/WAF model, the VPN Gateway is deployed in the Connectivity subscription alongside the VNet.

Landing Zone Placement

FieldValueConfig Path
SubscriptionConnectivity subscriptionazure.subscriptions.connectivity.id
Resource Grouprg-azrlconn-{env}-{region}-01network.vpn.azure_gateway.resource_group
VPN Gateway Namevpng-azrl-{env}-{region}-01network.vpn.azure_gateway.name
Public IP Namepip-azrlvpng-{env}-{region}-01network.vpn.azure_gateway.public_ip

Execution Options

Azure Portal

When to use: Learning Azure Local, single deployment, prefer visual interface

Procedure

Follow the same procedure as Single Subscription → Azure Portal above, but target the Connectivity subscription and resource group:

FieldValue
SubscriptionConnectivity subscription
Resource grouprg-azrlconn-{env}-{region}-01

All other settings (SKU, generation, BGP) remain identical.

Validation

  • VPN Gateway in Connectivity subscription
  • Provisioning state: Succeeded
  • BGP settings correct

Validation

  • VPN Gateway in Connectivity subscription
  • Provisioning state: Succeeded
  • BGP ASN matches config
  • Public IP reachable from on-premises firewall

Troubleshooting

IssueRoot CauseRemediation
Deployment fails after 45 minTransient Azure platform issueRetry; check Azure Status page
GatewaySubnet not foundTask 01 not completedComplete Task 01 first
BGP ASN conflictASN already in use by another gatewayChoose unique ASN in Planning & Discovery
Public IP SKU mismatchBasic SKU used with AZ gatewayUse Standard SKU with zone-redundant allocation
Active-active requires 2 PIPsSingle PIP with active-activeCreate second PIP or disable active-active

PreviousUpNext
Task 01: Virtual NetworkManual Deployment IndexTask 03: S2S VPN Connection

Version Control

  • Created: 2025-09-15 by Hybrid Cloud Solutions
  • Last Updated: 2026-03-03 by Hybrid Cloud Solutions
  • Version: 4.0.0
  • Tags: azure-local, vpn-gateway, networking, hybrid-connectivity
  • Keywords: VPN gateway, site-to-site, BGP, VpnGw2AZ, hybrid connectivity
  • Author: Hybrid Cloud Solutions