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

[Modules] Several smaller follow up updates to the Azure Firewall module #2547

Merged
merged 1 commit into from
Jan 10, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
@@ -1,10 +1,13 @@
@description('Optional. The location to deploy to.')
param location string = resourceGroup().location

@description('Required. The name of the Virtual WAN to create.')
param virtualWanName string

@description('Required. The name of the Virtual Hub to create.')
param virtualHubName string

@description('Required. The name of the Firewall Policy to create.')
param firewallPolicyName string

resource virtualWan 'Microsoft.Network/virtualWans@2021-08-01' = {
Expand Down Expand Up @@ -39,5 +42,5 @@ resource policy 'Microsoft.Network/firewallPolicies@2021-08-01' = {
@description('The resource ID of the created Virtual Hub.')
output virtualHubResourceId string = virtualHub.id

@description('The resource ID of the created Firewall Policie.')
@description('The resource ID of the created Firewall Policy.')
output firewallPolicyResourceId string = policy.id
20 changes: 10 additions & 10 deletions modules/Microsoft.Network/azureFirewalls/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,9 @@ resource azureFirewall 'Microsoft.Network/azureFirewalls@2021-08-01' = {
tags: tags
properties: azureSkuName == 'AZFW_VNet' ? {
threatIntelMode: threatIntelMode
firewallPolicy: empty(firewallPolicyId) ? null : {
firewallPolicy: !empty(firewallPolicyId) ? {
id: firewallPolicyId
}
} : null
ipConfigurations: ipConfigurations
sku: {
name: azureSkuName
Expand All @@ -255,17 +255,17 @@ resource azureFirewall 'Microsoft.Network/azureFirewalls@2021-08-01' = {
natRuleCollections: natRuleCollections
networkRuleCollections: networkRuleCollections
} : {
firewallPolicy: empty(firewallPolicyId) ? null : {
firewallPolicy: !empty(firewallPolicyId) ? {
id: firewallPolicyId
}
} : null
sku: {
name: azureSkuName
tier: azureSkuTier
}
hubIPAddresses: empty(hubIPAddresses) ? null : hubIPAddresses
virtualHub: empty(virtualHubId) ? null : {
hubIPAddresses: !empty(hubIPAddresses) ? hubIPAddresses : null
virtualHub: !empty(virtualHubId) ? {
id: virtualHubId
}
} : null
}
dependsOn: [
publicIPAddress
Expand Down Expand Up @@ -307,10 +307,10 @@ module azureFirewall_roleAssignments '.bicep/nested_roleAssignments.bicep' = [fo
}
}]

@description('The resource ID of the Azure firewall.')
@description('The resource ID of the Azure Firewall.')
output resourceId string = azureFirewall.id

@description('The name of the Azure firewall.')
@description('The name of the Azure Firewall.')
output name string = azureFirewall.name

@description('The resource group the Azure firewall was deployed into.')
Expand All @@ -319,7 +319,7 @@ output resourceGroupName string = resourceGroup().name
@description('The private IP of the Azure firewall.')
output privateIp string = contains(azureFirewall.properties, 'ipConfigurations') ? azureFirewall.properties.ipConfigurations[0].properties.privateIPAddress : ''

@description('The public ipconfiguration object for the AzureFirewallSubnet.')
@description('The public IP configuration object for the Azure Firewall Subnet.')
output ipConfAzureFirewallSubnet object = contains(azureFirewall.properties, 'ipConfigurations') ? azureFirewall.properties.ipConfigurations[0] : {}

@description('List of Application Rule Collections.')
Expand Down
6 changes: 3 additions & 3 deletions modules/Microsoft.Network/azureFirewalls/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,14 +292,14 @@ tags: {
| Output Name | Type | Description |
| :-- | :-- | :-- |
| `applicationRuleCollections` | array | List of Application Rule Collections. |
| `ipConfAzureFirewallSubnet` | object | The public ipconfiguration object for the AzureFirewallSubnet. |
| `ipConfAzureFirewallSubnet` | object | The public IP configuration object for the Azure Firewall Subnet. |
| `location` | string | The location the resource was deployed into. |
| `name` | string | The name of the Azure firewall. |
| `name` | string | The name of the Azure Firewall. |
| `natRuleCollections` | array | Collection of NAT rule collections used by Azure Firewall. |
| `networkRuleCollections` | array | List of Network Rule Collections. |
| `privateIp` | string | The private IP of the Azure firewall. |
| `resourceGroupName` | string | The resource group the Azure firewall was deployed into. |
| `resourceId` | string | The resource ID of the Azure firewall. |
| `resourceId` | string | The resource ID of the Azure Firewall. |

## Considerations

Expand Down