Skip to main content

Task 02: Configure Management Mode

Implementation Terraform

DOCUMENT CATEGORY: Task
SCOPE: Management mode network configuration
PURPOSE: Define VNet, VPN Gateway, subnets, and optional servers MASTER REFERENCE: Azure Local Deployment Overview

Status: Active Last Updated: 2026-02-07


Objective​

Describe the shared management infrastructure in infrastructure.yml: the virtual network and its subnets, the VPN gateway, Bastion, the NAT gateway, the network security groups and the optional management VMs. The Terraform code builds them from the file.


The Terraform variables come from infrastructure.yml

The Terraform code (src/terraform) does not define the facts of an environment a second time. New-IacVariableFiles.ps1 reads infrastructure.yml and writes terraform.tfvars.json and backend.hcl. The registry says, for every Terraform variable, which key it comes from. Every value comes from infrastructure.yml (a key the file leaves out gets its registry default); terraform.tfvars.example holds comments only. Add no .tfvars file of your own: a later -var-file overrides the generated values. A secret is never written to a file: the generator writes not-written.txt and names the environment variable that Terraform reads at run time.


Prerequisites​

  • Task 01 complete
  • The address plan from Planning & Discovery, with no conflict with the on-premises ranges
  • The landing zone model decided (single subscription or CAF/WAF)

Configuration​

Network keys​

KeyWhat it holds
landing_zone.networks[]Each virtual network: name, resource_group, location, address_space, dns_servers, peer_with
landing_zone.networks[].subnets[]Each subnet: name, prefix, network_security_group, route_table
landing_zone.network_security_groups[]Each group, with rules[] (name, priority, direction, access, protocol, address prefixes, port ranges)
landing_zone.connectivity.vpn_gatewayname, resource_group, network, sku, bgp_asn, site_to_site[] and point_to_site
landing_zone.connectivity.bastionname, resource_group, sku, network
landing_zone.connectivity.nat_gatewayname, resource_group, network, subnets, idle_timeout_minutes
landing_zone.virtual_machines[]The optional management VMs (utility server, network device monitor, and so on)
landing_zone:
networks:
- name: vnet-iic-mgmt-01
resource_group: rg-iic-mgmt-01
location: eastus
address_space: [192.0.2.0/24]
subnets:
- name: GatewaySubnet
prefix: 192.0.2.0/27
- name: AzureBastionSubnet
prefix: 192.0.2.64/26

The addresses are documentation addresses. Use your own plan. Write the files with New-IacVariableFiles.ps1 (see Task 01).


VPN Gateway SKU Options​

SKUTunnelsThroughputZone-RedundantUse Case
VpnGw130650 MbpsNoSmall deployments
VpnGw2301 GbpsNoStandard deployments
VpnGw3301.25 GbpsNoHigh bandwidth
VpnGw1AZ30650 MbpsYesSmall + HA
VpnGw2AZ301 GbpsYesRecommended
VpnGw3AZ301.25 GbpsYesHigh bandwidth + HA
Recommended SKU

Use VpnGw2AZ for zone-redundant high availability with 1 Gbps throughput.


IP Planning Guidelines​

Subnet Minimums​

SubnetMinimumRecommendedPurpose
Gateway/27 (32 IPs)/27VPN Gateway instances
Bastion/26 (64 IPs)/26Azure Bastion service
DNS/28 (16 IPs)/28DNS resolver
AZRL/27 (32 IPs)/27 or largerManagement VMs
Endpoints/27 (32 IPs)/27 or largerPrivate endpoints

Network Conflict Check​

Ensure Azure VNet CIDR does not overlap with:

  • ✅ On-premises management network
  • ✅ On-premises OOB network
  • ✅ Cluster networks
  • ✅ Other Azure VNets

Validation​

  • VNet CIDR does not conflict with on-premises networks
  • All subnets fit within VNet address space
  • Gateway subnet is minimum /27
  • Bastion subnet is minimum /26
  • DNS subnet is minimum /28
  • VPN Gateway SKU supports required bandwidth
  • BGP ASN and IPs are correct
  • Optional server flags set as desired

Next Steps​

Proceed to Task 03 - Configure Cluster Mode to define cluster-specific resources.



When to use: Use this tab if your CI/CD pipeline runs on GitHub Actions.

See procedure steps above for GitHub-specific guidance.

Toolkit Reference

Scripts for this task are located in the azurelocal-toolkit repository under scripts/deploy/ in the appropriate task folder.


Alternatives​

The procedures in this task use the methods shown in the tabs above. The toolkit is PowerShell 7 only and has no Bash scripts. A few tasks that act on Azure also have an Azure CLI script written in PowerShell. The script status page of the toolkit lists which task has which script.

PreviousUpNext
Task 01 - Core VariablesPhase 01 - ConfigurationTask 03 - Cluster Mode

Values from infrastructure.yml​

The pipeline settings are in the devops section of infrastructure.yml (schema 5): the platform, the project, the repository, the approval environments, the runners and the Terraform state. The Terraform code does not define these values a second time. config/variables/scripts/New-IacVariableFiles.ps1 writes terraform.tfvars.json and backend.hcl from the file. See the variables reference.


Troubleshooting​

IssueCauseResolution
Management mode configuration not applyingInvalid variable values in configuration fileVerify management mode variables match expected format
Pipeline fails at management mode validationConflicting settings between management and cluster modesReview mode configuration for consistency

Version Control​

VersionDateAuthorChanges
1.0.02026-03-24Azure Local CloudInitial release