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 NamePurposeAddress SpaceService EndpointsRoute TableNSGPrivate Endpoint Network PoliciesPrivate Link Service Network Policies
GatewaySubnetReserved for VPN and ExpressRoute gateways10.0.0.0/26NoneYesNoDisabledDisabled
RouterFrontendSubnetReserved for third-party site-to-site networking10.0.0.64/26NoneYesNoDisabledDisabled
RouterBackendSubnetReserved for third-party site-to-site networking10.0.0.192/26NoneYesNoDisabledDisabled
RouteServerSubnetReserved for route server10.0.3.128/26NoneNoNoDisabledDisabled
AzureFirewallSubnetReserved for Azure Firewall10.0.1.0/24Microsoft.Storage, Microsoft.Sql, Microsoft.AzureCosmosDB, Microsoft.KeyVault, Microsoft.ServiceBus, Microsoft.EventHub, Microsoft.Web, Microsoft.CognitiveServicesYesNoDisabledDisabled
AzureFirewallManagementSubnetReserved for Azure Firewall management10.0.2.0/24NoneYesNoDisabledDisabled
AzureBastionSubnetReserved for Azure Bastion10.0.3.192/26NoneNoYesDisabledDisabled

Route Tables

The module creates route tables for each subnet with the following routes:

Route Table NameRoute NameNoteAddress PrefixNext Hop IP AddressNext Hop Type
GatewaySubnet-rt
RouterFrontendSubnet-rt
RouterBackendSubnet-rt
AzureFirewallSubnet-rtEverywhereDefault route for Azure Firewall0.0.0.0/0Internet
AzureFirewallManagementSubnet-rtEverywhereDefault route for Azure Firewall management0.0.0.0/0Internet

Network Security Groups

The module attaches NSGs to subnets with the following security rules:

Rule NameDescriptionDirectionPriorityProtocolSourceDestinationAction
AllowHttpsFromInterntToAzurebastionsubnetAllow remote traffic via HTTPS from Azure Gateway Manager to the Azure Bastion SubnetInbound1000TcpInternet*Allow
AllowHttpsFromGatewaymanagerToAzurebastionsubnetAllow control plane traffic from Azure Gateway Manager to the Azure Bastion SubnetInbound1100TcpGatewayManager*Allow
AllowHttpsFromAzureLoadBalancerToAzurebastionsubnetAllow control plane traffic from Azure Gateway Manager to the Azure Bastion SubnetInbound1200TcpAzureLoadBalancer*Allow
AllowBastionHostCommunicationToAzurebastionsubnetAllow control plane traffic from Azure Gateway Manager to the Azure Bastion SubnetInbound1300TcpVirtualNetworkVirtualNetworkAllow (Ports: 8080, 5701)
DenyAllDeny all other traffic and override the default AllowVnetInBound ruleInbound4000***Deny
AllowSshRdpFromAzurebastionsubnetToVirtualNetworkAllow RDP and SSH from Azure Bastion Subnet to the Virtual NetworkOutbound1000Tcp*VirtualNetworkAllow (Ports: 22, 3389)
AllowHttpsFromAzurebastionsubnetToAzureCloudAllow HTTPS from Azure Bastion Subnet to Azure Cloud for diagnostics and monitoringOutbound1100Tcp*AzureCloudAllow
AllowBastionCommunicationFromAzurebastionsubnetToVirtualNetworkAllow data plane communication between the underlying components of Azure Bastion and the Virtual NetworkOutbound1200*VirtualNetworkVirtualNetworkAllow (Ports: 8080, 5701)
AllowGetSessionInformationFromAzurebastionsubnetToInternetAllow remote traffic via HTTPS from Azure Gateway Manager to the Azure Bastion SubnetOutbound1300**InternetAllow (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

NameTypeRequiredDefaultDescription
azureBastionConfigbastionConfigType (object)No{}Optional. Configuration settings for the Azure Bastion Host.
deploymentOptionsdeploymentOptionsType (object)No{"vpnGateway": false, "expressRouteGateway": false, "azur...Optional. Will Azure Firewall be deployed or not.
diagnosticsStoragemonitoringStorageType (object)No{}Optional. Resource ID(s) of storage systems that are used for diagnostics monitoring. Defaults to empty.
enableTelemetryboolNotrueOptional. Enable/Disable usage telemetry for module.
expressRouteGatewayConfiggatewayType (object)No{}Optional. Configuration settings for the Express Route Gateway.
firewallConfigfirewallConfigType (object)No{}Optional. Configuration settings for the Azure Firewall.
firewallPolicyConfigfirewallPolicyConfigType (object)No{}Optional. Configuration settings for the Azure Firewall Policy.
instancePrefixstringNo"10.0.0.0/16"Optional. The hub & spoke address space. Defaults to 10.0.0.0/16.
locationstringNo"[deployment().location]"Optional. Location for all resources.
locklockType (object)NoOptional. The lock settings of the service.
namestringNo"[replace(subscription().displayName, ' ', '-')]"Optional. Name of the Network Watcher resource (hidden).
partnerCountrystringNo"norway"Optional. The Partner ID for partner attribution.
roleAssignmentsroleAssignmentType (array)NoOptional. Array of role assignments to create.
routeServerBgpPeersbgpConnectionType (array)No[]Optional. An array detailing the remote BGP peers of this Route Server.
tagsobjectNoOptional. Tags of the resource.
vpnGatewayConfiggatewayType (object)No{}Optional. Configuration settings for the VPN Gateway.

Outputs

NameTypeDescription
azureBastionLocationstringThe location the Azure Bastion was deployed into.
azureBastionNamestringThe name of the Azure Bastion.
azureBastionResourceIdstringThe resource ID of the Azure Bastion.
erGatewayActiveActiveboolShows if the virtual network gateway is configured in Active-Active mode.
erGatewayAsnintThe ASN (Autonomous System Number) of the virtual network gateway.
erGatewayCustomBgpIpAddressesstringThe primary custom Azure APIPA BGP IP address.
erGatewayDefaultBgpIpAddressesstringThe primary default Azure BGP peer IP address.
erGatewayIdstringThe resource ID of the virtual network gateway.
erGatewayIpConfigurationsarrayThe IPconfigurations object of the Virtual Network Gateway.
erGatewayLocationstringThe location the resource was deployed into.
erGatewayNamestringThe name of the virtual network gateway.
erGatewayPrimaryPublicIpAddressstringThe primary public IP address of the virtual network gateway.
erGatewaySecondaryCustomBgpIpAddressstringThe secondary custom Azure APIPA BGP IP address (Active-Active mode).
erGatewaySecondaryDefaultBgpAddressstringThe secondary default Azure BGP peer IP address (Active-Active mode).
erGatewaySecondaryPublicIpAddressstringThe secondary public IP address of the virtual network gateway (Active-Active mode).
networkResourceGroupResourceIdstringThe resource ID of the deployed virtual network.
networkWatcherLocationstringThe location the resource was deployed into.
networkWatcherResourceGroupIdstringThe resource group ID of the deployed network watcher.
networkWatcherResourceGroupNamestringThe resource group the network watcher was deployed into.
networkWatcherResourceIdstringThe resource ID of the deployed network watcher.
networkWatchernamestringThe name of the deployed network watcher.
nsgNamesarrayThe name of the route table.
nsgNamesListarrayThe names of all Routes provided.
nsgResourceIdsarrayThe resource ID of the route table.
routeNamesListarrayThe names of all Routes provided.
routeTableNamesarrayThe name of the route table.
routeTableResourceIdsarrayThe resource ID of the route table.
subnetNamesarrayThe names of the deployed subnets.
subnetResourceIdsarrayThe resource IDs of the deployed subnets.
virtualNetworkNamestringThe name of the virtual network.
virtualNetworkResourceIdstringThe resource IDs of the deployed virtual network.
vpnGatewayActiveActiveboolShows if the virtual network gateway is configured in Active-Active mode.
vpnGatewayAsnintThe ASN (Autonomous System Number) of the virtual network gateway.
vpnGatewayCustomBgpIpAddressesstringThe primary custom Azure APIPA BGP IP address.
vpnGatewayDefaultBgpIpAddressesstringThe primary default Azure BGP peer IP address.
vpnGatewayIdstringThe resource ID of the virtual network gateway.
vpnGatewayIpConfigurationsarrayThe IPconfigurations object of the Virtual Network Gateway.
vpnGatewayLocationstringThe location the resource was deployed into.
vpnGatewayNamestringThe name of the virtual network gateway.
vpnGatewayPrimaryPublicIpAddressstringThe primary public IP address of the virtual network gateway.
vpnGatewaySecondaryCustomBgpIpAddressstringThe secondary custom Azure APIPA BGP IP address (Active-Active mode).
vpnGatewaySecondaryDefaultBgpAddressstringThe secondary default Azure BGP peer IP address (Active-Active mode).
vpnGatewaySecondaryPublicIpAddressstringThe 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

VersionPublished
0.1.52025-06-23
0.1.42025-06-16
0.1.32025-06-10
0.1.22025-06-09
0.1.12025-06-05
0.1.02025-05-30