Azure Hub Landing Zone
br/innofactor:avm/ptn/lz/hub:0.1.5
Overview
Hub Network Configuration Module
This module deploys a workload virtual network with associated resources, providing a standardized approach to configuring network infrastructure for workload environments. It simplifies the deployment process by automating the setup of key networking components and ensuring best practices for security and connectivity.
Features Implemented
- Virtual Network: Deploys a virtual network with configurable address space and subnets.
- Subnets: Creates subnets with customizable configurations for various workload components.
- Network Security Groups (NSGs): Attaches NSGs to subnets with pre-defined or custom security rules.
- Route Tables: Configures route tables for subnets to control network traffic flow.
- Azure Firewall Rules: Optionally creates firewall policy rule collection groups for network security.
- Diagnostics: Configures diagnostic settings for network resources.
- Network Watcher: Deploys Network Watcher resources for network monitoring and troubleshooting.
- Flow Logs: Sets up NSG flow logs for traffic analysis and security insights.
- VPN Gateway: Optionally deploys a VPN gateway for secure site-to-site connectivity.
- ExpressRoute Gateway: Optionally deploys an ExpressRoute gateway for dedicated private connectivity.
- Azure Route Server: Deploys an Azure Route Server for dynamic routing with BGP.
- Azure Bastion: Optionally deploys Azure Bastion for secure RDP/SSH access to virtual machines.
Default Behavior
By default, the module creates a Hub Virtual Network with the address space defaulted to ‘10.0.0.0/22’.
Subnets
The module creates the following subnets:
| Subnet Name | Purpose | Address Space | Service Endpoints | Route Table | NSG | Private Endpoint Network Policies | Private Link Service Network Policies |
|---|---|---|---|---|---|---|---|
| GatewaySubnet | Reserved for VPN and ExpressRoute gateways | 10.0.0.0/26 | None | Yes | No | Disabled | Disabled |
| RouterFrontendSubnet | Reserved for third-party site-to-site networking | 10.0.0.64/26 | None | Yes | No | Disabled | Disabled |
| RouterBackendSubnet | Reserved for third-party site-to-site networking | 10.0.0.192/26 | None | Yes | No | Disabled | Disabled |
| RouteServerSubnet | Reserved for route server | 10.0.3.128/26 | None | No | No | Disabled | Disabled |
| AzureFirewallSubnet | Reserved for Azure Firewall | 10.0.1.0/24 | Microsoft.Storage, Microsoft.Sql, Microsoft.AzureCosmosDB, Microsoft.KeyVault, Microsoft.ServiceBus, Microsoft.EventHub, Microsoft.Web, Microsoft.CognitiveServices | Yes | No | Disabled | Disabled |
| AzureFirewallManagementSubnet | Reserved for Azure Firewall management | 10.0.2.0/24 | None | Yes | No | Disabled | Disabled |
| AzureBastionSubnet | Reserved for Azure Bastion | 10.0.3.192/26 | None | No | Yes | Disabled | Disabled |
Route Tables
The module creates route tables for each subnet with the following routes:
| Route Table Name | Route Name | Note | Address Prefix | Next Hop IP Address | Next Hop Type |
|---|---|---|---|---|---|
| GatewaySubnet-rt | |||||
| RouterFrontendSubnet-rt | |||||
| RouterBackendSubnet-rt | |||||
| AzureFirewallSubnet-rt | Everywhere | Default route for Azure Firewall | 0.0.0.0/0 | Internet | |
| AzureFirewallManagementSubnet-rt | Everywhere | Default route for Azure Firewall management | 0.0.0.0/0 | Internet |
Network Security Groups
The module attaches NSGs to subnets with the following security rules:
| Rule Name | Description | Direction | Priority | Protocol | Source | Destination | Action |
|---|---|---|---|---|---|---|---|
| AllowHttpsFromInterntToAzurebastionsubnet | Allow remote traffic via HTTPS from Azure Gateway Manager to the Azure Bastion Subnet | Inbound | 1000 | Tcp | Internet | * | Allow |
| AllowHttpsFromGatewaymanagerToAzurebastionsubnet | Allow control plane traffic from Azure Gateway Manager to the Azure Bastion Subnet | Inbound | 1100 | Tcp | GatewayManager | * | Allow |
| AllowHttpsFromAzureLoadBalancerToAzurebastionsubnet | Allow control plane traffic from Azure Gateway Manager to the Azure Bastion Subnet | Inbound | 1200 | Tcp | AzureLoadBalancer | * | Allow |
| AllowBastionHostCommunicationToAzurebastionsubnet | Allow control plane traffic from Azure Gateway Manager to the Azure Bastion Subnet | Inbound | 1300 | Tcp | VirtualNetwork | VirtualNetwork | Allow (Ports: 8080, 5701) |
| DenyAll | Deny all other traffic and override the default AllowVnetInBound rule | Inbound | 4000 | * | * | * | Deny |
| AllowSshRdpFromAzurebastionsubnetToVirtualNetwork | Allow RDP and SSH from Azure Bastion Subnet to the Virtual Network | Outbound | 1000 | Tcp | * | VirtualNetwork | Allow (Ports: 22, 3389) |
| AllowHttpsFromAzurebastionsubnetToAzureCloud | Allow HTTPS from Azure Bastion Subnet to Azure Cloud for diagnostics and monitoring | Outbound | 1100 | Tcp | * | AzureCloud | Allow |
| AllowBastionCommunicationFromAzurebastionsubnetToVirtualNetwork | Allow data plane communication between the underlying components of Azure Bastion and the Virtual Network | Outbound | 1200 | * | VirtualNetwork | VirtualNetwork | Allow (Ports: 8080, 5701) |
| AllowGetSessionInformationFromAzurebastionsubnetToInternet | Allow remote traffic via HTTPS from Azure Gateway Manager to the Azure Bastion Subnet | Outbound | 1300 | * | * | Internet | Allow (Port: 80) |
Customization
The module supports extensive customization through parameters, including:
- Virtual Network and subnet address spaces
- NSG rules and route table entries
- Peering configurations
- Azure Firewall rule collections
- Diagnostic and monitoring settings
This module ensures a consistent and secure approach to deploying workload networking infrastructure, reducing manual configuration efforts and enforcing organizational standards.
Quick Start
To use this module, provide the necessary parameters such as name, location, and virtual network configuration. The module will handle the deployment and configuration of all associated networking resources.
module workloadNetwork 'br/public:avm/ptn/lz/hub:<version>' = {
name: 'workloadNetworkDeployment'
params: {
location: enforcedLocation
instancePrefix: '10.0.0.0/16'
}
}This deployment will create a basic workload network setup, which can be further customized as needed.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
azureBastionConfig | bastionConfigType (object) | No | {} | Optional. Configuration settings for the Azure Bastion Host. |
deploymentOptions | deploymentOptionsType (object) | No | {"vpnGateway": false, "expressRouteGateway": false, "azur... | Optional. Will Azure Firewall be deployed or not. |
diagnosticsStorage | monitoringStorageType (object) | No | {} | Optional. Resource ID(s) of storage systems that are used for diagnostics monitoring. Defaults to empty. |
enableTelemetry | bool | No | true | Optional. Enable/Disable usage telemetry for module. |
expressRouteGatewayConfig | gatewayType (object) | No | {} | Optional. Configuration settings for the Express Route Gateway. |
firewallConfig | firewallConfigType (object) | No | {} | Optional. Configuration settings for the Azure Firewall. |
firewallPolicyConfig | firewallPolicyConfigType (object) | No | {} | Optional. Configuration settings for the Azure Firewall Policy. |
instancePrefix | string | No | "10.0.0.0/16" | Optional. The hub & spoke address space. Defaults to 10.0.0.0/16. |
location | string | No | "[deployment().location]" | Optional. Location for all resources. |
lock | lockType (object) | No | Optional. The lock settings of the service. | |
name | string | No | "[replace(subscription().displayName, ' ', '-')]" | Optional. Name of the Network Watcher resource (hidden). |
partnerCountry | string | No | "norway" | Optional. The Partner ID for partner attribution. |
roleAssignments | roleAssignmentType (array) | No | Optional. Array of role assignments to create. | |
routeServerBgpPeers | bgpConnectionType (array) | No | [] | Optional. An array detailing the remote BGP peers of this Route Server. |
tags | object | No | Optional. Tags of the resource. | |
vpnGatewayConfig | gatewayType (object) | No | {} | Optional. Configuration settings for the VPN Gateway. |
Outputs
| Name | Type | Description |
|---|---|---|
azureBastionLocation | string | The location the Azure Bastion was deployed into. |
azureBastionName | string | The name of the Azure Bastion. |
azureBastionResourceId | string | The resource ID of the Azure Bastion. |
erGatewayActiveActive | bool | Shows if the virtual network gateway is configured in Active-Active mode. |
erGatewayAsn | int | The ASN (Autonomous System Number) of the virtual network gateway. |
erGatewayCustomBgpIpAddresses | string | The primary custom Azure APIPA BGP IP address. |
erGatewayDefaultBgpIpAddresses | string | The primary default Azure BGP peer IP address. |
erGatewayId | string | The resource ID of the virtual network gateway. |
erGatewayIpConfigurations | array | The IPconfigurations object of the Virtual Network Gateway. |
erGatewayLocation | string | The location the resource was deployed into. |
erGatewayName | string | The name of the virtual network gateway. |
erGatewayPrimaryPublicIpAddress | string | The primary public IP address of the virtual network gateway. |
erGatewaySecondaryCustomBgpIpAddress | string | The secondary custom Azure APIPA BGP IP address (Active-Active mode). |
erGatewaySecondaryDefaultBgpAddress | string | The secondary default Azure BGP peer IP address (Active-Active mode). |
erGatewaySecondaryPublicIpAddress | string | The secondary public IP address of the virtual network gateway (Active-Active mode). |
networkResourceGroupResourceId | string | The resource ID of the deployed virtual network. |
networkWatcherLocation | string | The location the resource was deployed into. |
networkWatcherResourceGroupId | string | The resource group ID of the deployed network watcher. |
networkWatcherResourceGroupName | string | The resource group the network watcher was deployed into. |
networkWatcherResourceId | string | The resource ID of the deployed network watcher. |
networkWatchername | string | The name of the deployed network watcher. |
nsgNames | array | The name of the route table. |
nsgNamesList | array | The names of all Routes provided. |
nsgResourceIds | array | The resource ID of the route table. |
routeNamesList | array | The names of all Routes provided. |
routeTableNames | array | The name of the route table. |
routeTableResourceIds | array | The resource ID of the route table. |
subnetNames | array | The names of the deployed subnets. |
subnetResourceIds | array | The resource IDs of the deployed subnets. |
virtualNetworkName | string | The name of the virtual network. |
virtualNetworkResourceId | string | The resource IDs of the deployed virtual network. |
vpnGatewayActiveActive | bool | Shows if the virtual network gateway is configured in Active-Active mode. |
vpnGatewayAsn | int | The ASN (Autonomous System Number) of the virtual network gateway. |
vpnGatewayCustomBgpIpAddresses | string | The primary custom Azure APIPA BGP IP address. |
vpnGatewayDefaultBgpIpAddresses | string | The primary default Azure BGP peer IP address. |
vpnGatewayId | string | The resource ID of the virtual network gateway. |
vpnGatewayIpConfigurations | array | The IPconfigurations object of the Virtual Network Gateway. |
vpnGatewayLocation | string | The location the resource was deployed into. |
vpnGatewayName | string | The name of the virtual network gateway. |
vpnGatewayPrimaryPublicIpAddress | string | The primary public IP address of the virtual network gateway. |
vpnGatewaySecondaryCustomBgpIpAddress | string | The secondary custom Azure APIPA BGP IP address (Active-Active mode). |
vpnGatewaySecondaryDefaultBgpAddress | string | The secondary default Azure BGP peer IP address (Active-Active mode). |
vpnGatewaySecondaryPublicIpAddress | string | The secondary public IP address of the virtual network gateway (Active-Active mode). |
Changelog
No changelog has been published for this module yet. See the version history below.
Version history
| Version | Published |
|---|---|
0.1.5 | 2025-06-23 |
0.1.4 | 2025-06-16 |
0.1.3 | 2025-06-10 |
0.1.2 | 2025-06-09 |
0.1.1 | 2025-06-05 |
0.1.0 | 2025-05-30 |