Point-to-Site and Site-to-Site VPN connectivity for secure remote access to the private AKS cluster and Azure services.
[!NOTE] Part of the Deployment Guide. Return there for navigation and deployment order.
[!IMPORTANT] Required for default configuration. With
should_enable_private_aks_cluster = true(the default), you must deploy this VPN Gateway and connect before runningkubectlcommands or cluster setup scripts. Without VPN, the private cluster endpoint is not accessible.To skip VPN, set
should_enable_private_aks_cluster = falsein yourterraform.tfvarsfor a public AKS control plane.
cd infrastructure/terraform && terraform apply)environment, resource_prefix, location)cd infrastructure/terraform/vpn
# Configure
cp terraform.tfvars.example terraform.tfvars
# Edit: environment, resource_prefix, location (must match 001-iac)
terraform init && terraform apply
Deployment takes 20-30 minutes for the VPN Gateway.
| Variable | Description | Default |
|---|---|---|
gateway_subnet_address_prefix |
GatewaySubnet CIDR (min /27) | 10.0.3.0/27 |
vpn_gateway_config.sku |
Gateway SKU | VpnGw1AZ |
vpn_gateway_config.client_address_pool |
P2S client IP range | ["192.168.200.0/24"] |
aad_auth_config.should_enable |
Enable Azure AD auth | true |
Non-AZ VPN Gateway SKUs are being deprecated by Azure. Use the AZ equivalents (VpnGw1AZ, VpnGw2AZ, VpnGw3AZ) to avoid portal warnings and unplanned SKU updates outside Terraform.
Enabled by default. Users authenticate with their Azure AD credentials via the Azure VPN Client.
aad_auth_config = {
should_enable = true
}
For environments without Azure AD integration:
aad_auth_config = {
should_enable = false
}
root_certificate_public_data = "MIIC5jCCAc6g..." # Base64-encoded cert
| Platform | Installation |
|---|---|
| Windows | Microsoft Store |
| macOS | App Store |
| Ubuntu 20.04/22.04 | Microsoft Docs |
vgw-<resource_prefix>-<environment>-<instance>)AzureVPN folderazurevpnconfig_aad.xml (for Azure AD authentication)Once connected, you can access private endpoints including OSMO UI, PostgreSQL, and Redis.
Connect on-premises networks:
vpn_site_connections = [{
name = "on-prem-datacenter"
address_spaces = ["10.100.0.0/16"]
gateway_ip_address = "203.0.113.10"
shared_key_reference = "datacenter-key"
}]
vpn_site_shared_keys = {
"datacenter-key" = "your-preshared-key"
}
🤖 Crafted with precision by ✨Copilot following brilliant human instruction, then carefully refined by our team of discerning human reviewers.