Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure Firewall custom DNS server #615

Merged
merged 17 commits into from
Sep 9, 2023
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ parAzFirewallAvailabilityZones | No | Availability Zones to deploy the Azu
parAzErGatewayAvailabilityZones | No | Availability Zones to deploy the VPN/ER PIP across. Region must support Availability Zones to use. If it does not then leave empty. Ensure that you select a zonal SKU for the ER/VPN Gateway if using Availability Zones for the PIP.
parAzVpnGatewayAvailabilityZones | No | Availability Zones to deploy the VPN/ER PIP across. Region must support Availability Zones to use. If it does not then leave empty. Ensure that you select a zonal SKU for the ER/VPN Gateway if using Availability Zones for the PIP.
parAzFirewallDnsProxyEnabled | No | Switch to enable/disable Azure Firewall DNS Proxy.
parAzFirewallDnsServers | No | Array of custom DNS servers used by Azure Firewall
parHubRouteTableName | No | Name of Route table to create for the default route of Hub.
parDisableBgpRoutePropagation | No | Switch to enable/disable BGP Propagation on route table.
parPrivateDnsZonesEnabled | No | Switch to enable/disable Private DNS Zones deployment.
Expand Down Expand Up @@ -236,6 +237,12 @@ Switch to enable/disable Azure Firewall DNS Proxy.

- Default value: `True`

### parAzFirewallDnsServers

![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square)

Array of custom DNS servers used by Azure Firewall

### parHubRouteTableName

![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square)
Expand Down Expand Up @@ -449,6 +456,9 @@ outHubVirtualNetworkId | string |
"parAzFirewallDnsProxyEnabled": {
"value": true
},
"parAzFirewallDnsServers": {
"value": []
},
"parHubRouteTableName": {
"value": "[format('{0}-hub-routetable', parameters('parCompanyPrefix'))]"
},
Expand Down
4 changes: 4 additions & 0 deletions infra-as-code/bicep/modules/hubNetworking/hubNetworking.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ param parAzVpnGatewayAvailabilityZones array = []
@sys.description('Switch to enable/disable Azure Firewall DNS Proxy.')
param parAzFirewallDnsProxyEnabled bool = true

@sys.description('Array of custom DNS servers used by Azure Firewall')
param parAzFirewallDnsServers array = []

@sys.description('Name of Route table to create for the default route of Hub.')
param parHubRouteTableName string = '${parCompanyPrefix}-hub-routetable'

Expand Down Expand Up @@ -661,6 +664,7 @@ resource resFirewallPolicies 'Microsoft.Network/firewallPolicies@2023-02-01' = i
} : {
dnsSettings: {
enableProxy: parAzFirewallDnsProxyEnabled
servers: parAzFirewallDnsServers
}
sku: {
tier: parAzFirewallTier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ parCompanyPrefix | No | Prefix value which will be prepended to all resour
parAzFirewallTier | No | Azure Firewall Tier associated with the Firewall to deploy.
parVirtualHubEnabled | No | Switch to enable/disable Virtual Hub deployment.
parAzFirewallDnsProxyEnabled | No | Switch to enable/disable Azure Firewall DNS Proxy.
parAzFirewallDnsServers | No | Array of custom DNS servers used by Azure Firewall
parVirtualWanName | No | Prefix Used for Virtual WAN.
parVirtualWanHubName | No | Prefix Used for Virtual WAN Hub.
parVirtualWanHubs | No | Array Used for multiple Virtual WAN Hubs deployment. Each object in the array represents an individual Virtual WAN Hub configuration. Add/remove additional objects in the array to meet the number of Virtual WAN Hubs required. - `parVpnGatewayEnabled` - Switch to enable/disable VPN Gateway deployment on the respective Virtual WAN Hub. - `parExpressRouteGatewayEnabled` - Switch to enable/disable ExpressRoute Gateway deployment on the respective Virtual WAN Hub. - `parAzFirewallEnabled` - Switch to enable/disable Azure Firewall deployment on the respective Virtual WAN Hub. - `parVirtualHubAddressPrefix` - The IP address range in CIDR notation for the vWAN virtual Hub to use. - `parHubLocation` - The Virtual WAN Hub location. - `parHubRoutingPreference` - The Virtual WAN Hub routing preference. The allowed values are `ASN`, `VpnGateway`, `ExpressRoute`. - `parVirtualRouterAutoScaleConfiguration` - The Virtual WAN Hub capacity. The value should be between 2 to 50. - `parVirtualHubRoutingIntentDestinations` - The Virtual WAN Hub routing intent destinations, leave empty if not wanting to enable routing intent. The allowed values are `Internet`, `PrivateTraffic`.
Expand Down Expand Up @@ -73,6 +74,12 @@ Switch to enable/disable Azure Firewall DNS Proxy.

- Default value: `True`

### parAzFirewallDnsServers

![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square)

Array of custom DNS servers used by Azure Firewall

### parVirtualWanName

![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square)
Expand Down Expand Up @@ -269,6 +276,9 @@ outPrivateDnsZonesNames | array |
"parAzFirewallDnsProxyEnabled": {
"value": true
},
"parAzFirewallDnsServers": {
"value": []
},
"parVirtualWanName": {
"value": "[format('{0}-vwan-{1}', parameters('parCompanyPrefix'), parameters('parLocation'))]"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ param parVirtualHubEnabled bool = true
@sys.description('Switch to enable/disable Azure Firewall DNS Proxy.')
param parAzFirewallDnsProxyEnabled bool = true

@sys.description('Array of custom DNS servers used by Azure Firewall')
param parAzFirewallDnsServers array = []

@sys.description('Prefix Used for Virtual WAN.')
param parVirtualWanName string = '${parCompanyPrefix}-vwan-${parLocation}'

Expand Down Expand Up @@ -289,6 +292,7 @@ resource resFirewallPolicies 'Microsoft.Network/firewallPolicies@2023-02-01' = i
} : {
dnsSettings: {
enableProxy: parAzFirewallDnsProxyEnabled
servers: parAzFirewallDnsServers
}
sku: {
tier: parAzFirewallTier
Expand Down