Azure Virtual WAN provides a managed networking architecture that simplifies connectivity between virtual networks, branch locations, VPN connections, and ExpressRoute connections. At the centre of this architecture is the Virtual Hub, which provides managed connectivity and routing. When Azure Firewall and the associated security and routing policies are configured for the Virtual Hub through Azure Firewall Manager, it becomes a secured virtual hub. Azure Firewall in the secured virtual hub can then provide centralized security and traffic inspection for traffic moving through the Virtual WAN environment. The same firewall can also be configured for private and public networking traffic inspection by setting the private and public Routing Intent.
Public IP Addresses with Azure Firewall
While we use the azure vWAN secure Hub with Azure Firewall and public routing intent, it requires Public IP addresses for public connectivity. These Public IP addresses are important for both inbound and outbound traffic scenarios.
For outbound traffic, Azure Firewall Public IP addresses can be used as source addresses when workloads communicate with destinations on the internet. Having known Public IP addresses can be important when external systems allow traffic based on specific source IP addresses.
For inbound traffic, Azure Firewall can provide controlled access to internal workloads through features such as Destination Network Address Translation (DNAT). External traffic reaches a Public IP associated with the firewall and is translated and forwarded to the appropriate internal destination according to the configured firewall rules. The same IP then can also be configured with DNS to provide an FQDN based endpoint solution to the upstream applications. In many deployments, Public IP addresses can be managed as part of the Azure Firewall deployment.
However, there are also scenarios where organizations want to create and manage their own Public IP resources and then associate those specific Public IP addresses with Azure Firewall.
For example, an organization might need to:
- Maintain consistent Public IP addresses across the deployment.
- Control the creation and lifecycle of the Public IP resources separately from Azure Firewall.
- Use known Public IP addresses for outbound connectivity where external systems depend on source IP allowlists.
- Maintain specific Public IP addresses for inbound connectivity and DNAT scenarios.
- Meet existing networking, security, or compliance requirements that depend on known Public IP addresses.
The deployment model therefore changes from simply defining how many Public IP addresses the firewall requires to defining which Public IP resources the firewall should use.
Customer-Provided Public IP Addresses
Azure Firewall in Virtual WAN secured hubs now supports the use of customer-provided public IP addresses. This capability enables organizations to bring their own public IP addresses when deploying Azure Firewall in a secured Virtual WAN hub, providing greater flexibility and control over network infrastructure.
With this feature, instead of relying on Azure-managed public IP addresses, you can specify your own public IP addresses that are already allocated in your Azure subscription. This is particularly valuable for organizations that require consistent IP addresses for compliance, security policies, or integration with third-party systems.
Inbound Traffic flow
Internet > Azure firewall Public IP > DNAT Rule > Vwan secure Hub > Application Ingress
Outbound Traffic flow
Apps > Secured Virtual Hub > Azure Firewall → Customer-managed Public IP → Internet
According to Microsoft documentation, customer-provided Public IP addresses must:
- Use the Standard SKU.
- Use Static allocation.
- Should be deployed in the same Azure region as the Virtual Hub.
- Not already be associated with another Azure resource.
A secured virtual hub can also associate multiple customer-provided Public IP addresses with Azure Firewall.
The configuration can be implemented directly through the Azure portal when deploying Azure Firewall in a secured Virtual WAN hub. During the firewall configuration, existing eligible Public IP resources can be selected as customer-provided Public IP addresses instead of relying on Azure-managed Public IPs. This allows the firewall to use specific Public IP resources while their lifecycle remains independently managed.
Source: Customer provided public IP address support in secured hubs | Microsoft Learn
The Infrastructure-as-Code Challenge
Although customer-provided Public IP addresses can be configured for Azure Firewall in a secured Virtual WAN hub through the Azure platform, implementing the same configuration through Infrastructure as Code introduces an additional consideration.
The Virtual WAN environment in this implementation is deployed using Terraform and Azure Verified Modules (AVM). AVM provides reusable Terraform modules for deploying Azure resources using standardized patterns and helps keep infrastructure deployments consistent and repeatable.
For the secured Virtual Hub Azure Firewall configuration, the available implementation exposed a parameter such as vhub_public_ip_count. This parameter is suitable when the deployment only needs to define how many Public IP addresses should be associated with the firewall. For example, a value of 2 represents the requirement for two Public IP addresses to be provisioned as part of the firewall configuration.
Customer-provided Public IP addresses work differently. In this scenario, the Public IP resources already exist or are created separately, so the deployment does not simply need to know the number of Public IP addresses. It needs to know which specific Public IP resources should be associated with Azure Firewall. This requires passing the Azure resource IDs of those Public IP addresses into the firewall configuration.
Therefore, a count-based parameter such as vhub_public_ip_count alone cannot represent the complete customer-provided Public IP configuration. At the time of this implementation, the available AVM-based configuration provided the option to specify the Public IP count but did not expose an input through which specific customer-provided Public IP resource IDs could be passed to the secured hub firewall.
This created a gap between the capability already supported by the Azure platform and the way that capability could be represented through the existing Terraform and AVM implementation.
Remediation: Customer-Provided Public IP Support in AVM
The Azure platform already supported customer-provided Public IP addresses for Azure Firewall in a secured Virtual WAN hub. However, the earlier AVM implementation primarily exposed vhub_public_ip_count, which allowed the deployment to specify the number of Public IP addresses required by the firewall but did not provide a direct way to pass specific customer-owned Public IP resource IDs.
To address this gap, support for customer-provided Public IP addresses was introduced in the Azure Verified Pattern Module for Azure Landing Zone Connectivity with Virtual WAN through a GitHub contribution.
The enhancement added support for an ip_configurations map under the firewall configuration of each Virtual Hub. Each entry can now specify a firewall IP configuration name together with the public_ip_address_id of an existing customer-managed Public IP resource.
The change was reviewed through the module's GitHub contribution process and has now been merged into the AVM repository. As a result, the AVM Virtual WAN module can now support both deployment models:
Azure-managed Public IPs
The existing vhub_public_ip_count configuration can continue to be used when Azure should manage the Public IP addresses associated with the secured hub firewall.
Customer-provided Public IPs
The new firewall.ip_configurations configuration can be used when specific existing Public IP resources need to be associated with Azure Firewall