Microsoft.Network azureFirewalls

Bicep 資源定義

azureFirewalls 資源類型可以使用目標作業進行部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄

資源格式

若要建立 Microsoft.Network/azureFirewalls 資源,請將下列 Bicep 新增至您的範本。

resource symbolicname 'Microsoft.Network/azureFirewalls@2023-04-01' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  properties: {
    additionalProperties: {}
    applicationRuleCollections: [
      {
        id: 'string'
        name: 'string'
        properties: {
          action: {
            type: 'string'
          }
          priority: int
          rules: [
            {
              description: 'string'
              fqdnTags: [
                'string'
              ]
              name: 'string'
              protocols: [
                {
                  port: int
                  protocolType: 'string'
                }
              ]
              sourceAddresses: [
                'string'
              ]
              sourceIpGroups: [
                'string'
              ]
              targetFqdns: [
                'string'
              ]
            }
          ]
        }
      }
    ]
    firewallPolicy: {
      id: 'string'
    }
    hubIPAddresses: {
      privateIPAddress: 'string'
      publicIPs: {
        addresses: [
          {
            address: 'string'
          }
        ]
        count: int
      }
    }
    ipConfigurations: [
      {
        id: 'string'
        name: 'string'
        properties: {
          publicIPAddress: {
            id: 'string'
          }
          subnet: {
            id: 'string'
          }
        }
      }
    ]
    managementIpConfiguration: {
      id: 'string'
      name: 'string'
      properties: {
        publicIPAddress: {
          id: 'string'
        }
        subnet: {
          id: 'string'
        }
      }
    }
    natRuleCollections: [
      {
        id: 'string'
        name: 'string'
        properties: {
          action: {
            type: 'string'
          }
          priority: int
          rules: [
            {
              description: 'string'
              destinationAddresses: [
                'string'
              ]
              destinationPorts: [
                'string'
              ]
              name: 'string'
              protocols: [
                'string'
              ]
              sourceAddresses: [
                'string'
              ]
              sourceIpGroups: [
                'string'
              ]
              translatedAddress: 'string'
              translatedFqdn: 'string'
              translatedPort: 'string'
            }
          ]
        }
      }
    ]
    networkRuleCollections: [
      {
        id: 'string'
        name: 'string'
        properties: {
          action: {
            type: 'string'
          }
          priority: int
          rules: [
            {
              description: 'string'
              destinationAddresses: [
                'string'
              ]
              destinationFqdns: [
                'string'
              ]
              destinationIpGroups: [
                'string'
              ]
              destinationPorts: [
                'string'
              ]
              name: 'string'
              protocols: [
                'string'
              ]
              sourceAddresses: [
                'string'
              ]
              sourceIpGroups: [
                'string'
              ]
            }
          ]
        }
      }
    ]
    sku: {
      name: 'string'
      tier: 'string'
    }
    threatIntelMode: 'string'
    virtualHub: {
      id: 'string'
    }
  }
  zones: [
    'string'
  ]
}

屬性值

azureFirewalls

名稱 描述
NAME 資源名稱 字串 (必要)

字元限制:1-80

合法字元:
英數字元、底線、句號和連字號。

以英數字元開頭。 以英數字元或底線結尾。
location 資源位置。 字串
tags 資源標籤。 標記名稱和值的字典。 請參閱 範本中的標記
properties Azure 防火牆的屬性。 AzureFirewallPropertiesFormat
zones (區域) 可用性區域清單,指出資源需要來自何處。 string[]

AzureFirewallPropertiesFormat

名稱 描述
additionalProperties 用來進一步設定此 Azure 防火牆的其他屬性。 物件 (object)
applicationRuleCollections Azure 防火牆 所使用的應用程式規則集合集合。 AzureFirewallApplicationRuleCollection[]
firewallPolicy 與此 Azure 防火牆相關聯的 firewallPolicy。 SubResource
hubIPAddresses 與 AzureFirewall 相關聯的 IP 位址。 HubIPAddresses
ipConfigurations Azure 防火牆 資源的IP組態。 AzureFirewallIPConfiguration[]
managementIpConfiguration 用於管理流量之 Azure 防火牆的IP組態。 AzureFirewallIPConfiguration
natRuleCollections Azure 防火牆 使用的NAT規則集合集合。 AzureFirewallNatRuleCollection[]
networkRuleCollections Azure 防火牆 所使用的網路規則集合集合。 AzureFirewallNetworkRuleCollection[]
sku Azure 防火牆 資源 SKU。 AzureFirewallSku
threatIntelMode 威脅情報的作業模式。 'Alert'
'Deny'
'Off'
virtualHub 防火牆所屬的 virtualHub。 SubResource

AzureFirewallApplicationRuleCollection

名稱 描述
id 資源識別碼。 字串
NAME Azure 防火牆內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties Azure 防火牆應用程式規則集合的屬性。 AzureFirewallApplicationRuleCollectionPropertiesForm...

AzureFirewallApplicationRuleCollectionPropertiesForm...

名稱 描述
動作 規則集合的動作類型。 AzureFirewallRCAction
priority 應用程式規則集合資源的優先順序。 int
規則 應用程式規則集合所使用的規則集合。 AzureFirewallApplicationRule[]

AzureFirewallRCAction

名稱 描述
類型 動作的類型。 'Allow'
'Deny'

AzureFirewallApplicationRule

名稱 描述
description 規則的描述。 字串
fqdnTags 此規則的 FQDN 標籤清單。 string[]
NAME 應用程式規則的名稱。 字串
protocols ApplicationRuleProtocols 的陣列。 AzureFirewallApplicationRuleProtocol[]
sourceAddresses 此規則的來源IP位址清單。 string[]
sourceIpGroups 此規則的來源 IpGroup 清單。 string[]
targetFqdns 此規則的 FQDN 清單。 string[]

AzureFirewallApplicationRuleProtocol

名稱 描述
連接埠 通訊協定的埠號碼不能大於 64000。 這是選擇性欄位。 int
protocolType 通訊協定類型。 'Http'
'Https'
'Mssql'

SubResource

名稱 描述
id 資源識別碼。 字串

HubIPAddresses

名稱 描述
privateIPAddress 與 Azure 防火牆相關聯的私人 IP 位址。 字串
publicIPs 與 Azure 防火牆相關聯的公用 IP 位址。 HubPublicIPAddresses

HubPublicIPAddresses

名稱 描述
地址 與要保留的 Azure 防火牆或 IP 位址相關聯的公用 IP 位址清單。 AzureFirewallPublicIPAddress[]
計數 與 Azure 防火牆相關聯的公用 IP 位址數目。 int

AzureFirewallPublicIPAddress

名稱 描述
address 公用IP位址值。 字串

AzureFirewallIPConfiguration

名稱 描述
id 資源識別碼。 字串
NAME 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties Azure 防火牆 IP 組態的屬性。 AzureFirewallIPConfigurationPropertiesFormat

AzureFirewallIPConfigurationPropertiesFormat

名稱 描述
publicIPAddress PublicIP 資源的參考。 如果子網不是 Null,則此字段是強制輸入。 SubResource
子網路 子網資源的參考。 此資源必須命名為 『AzureFirewallSubnet』 或 'AzureFirewallManagementSubnet'。 SubResource

AzureFirewallNatRuleCollection

名稱 描述
id 資源識別碼。 字串
NAME Azure 防火牆內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties Azure 防火牆 NAT 規則集合的屬性。 AzureFirewallNatRuleCollectionProperties

AzureFirewallNatRuleCollectionProperties

名稱 描述
動作 NAT 規則集合的動作類型。 AzureFirewallNatRCAction
priority NAT 規則集合資源的優先順序。 int
規則 NAT 規則集合所使用的規則集合。 AzureFirewallNatRule[]

AzureFirewallNatRCAction

名稱 描述
類型 動作的類型。 'Dnat'
'Snat'

AzureFirewallNatRule

名稱 描述
description 規則的描述。 字串
destinationAddresses 此規則的目的地IP位址清單。 支援IP範圍、前置詞和服務標籤。 string[]
destinationPorts 目的地埠清單。 string[]
NAME NAT 規則的名稱。 字串
protocols 適用於此 NAT 規則的 AzureFirewallNetworkRuleProtocols 陣列。 包含任何項目的字串數組:
'Any'
'ICMP'
'TCP'
'UDP'
sourceAddresses 此規則的來源IP位址清單。 string[]
sourceIpGroups 此規則的來源 IpGroup 清單。 string[]
translatedAddress 此 NAT 規則的已轉譯位址。 字串
translatedFqdn 此 NAT 規則的已翻譯 FQDN。 字串
translatedPort 此 NAT 規則的已轉譯埠。 字串

AzureFirewallNetworkRuleCollection

名稱 描述
id 資源識別碼。 字串
NAME Azure 防火牆內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties Azure 防火牆網路規則集合的屬性。 AzureFirewallNetworkRuleCollectionPropertiesFormat

AzureFirewallNetworkRuleCollectionPropertiesFormat

名稱 描述
動作 規則集合的動作類型。 AzureFirewallRCAction
priority 網路規則集合資源的優先順序。 int
規則 網路規則集合所使用的規則集合。 AzureFirewallNetworkRule[]

AzureFirewallNetworkRule

名稱 描述
description 規則的描述。 字串
destinationAddresses 目的地IP位址清單。 string[]
destinationFqdns 目的地 FQDN 的清單。 string[]
destinationIpGroups 此規則的目的地 IpGroups 清單。 string[]
destinationPorts 目的地埠清單。 string[]
NAME 網路規則的名稱。 字串
protocols AzureFirewallNetworkRuleProtocols 的陣列。 包含任何項目的字串數組:
'Any'
'ICMP'
'TCP'
'UDP'
sourceAddresses 此規則的來源IP位址清單。 string[]
sourceIpGroups 此規則的來源 IpGroup 清單。 string[]

AzureFirewallSku

名稱 描述
NAME Azure 防火牆 SKU 的名稱。 'AZFW_Hub'
'AZFW_VNet'
tier Azure 防火牆 層。 'Basic'
'Premium'
'Standard'

快速入門範本

下列快速入門範本會部署此資源類型。

範本 描述
使用 Azure 防火牆 作為中樞 & 輪輻拓撲中的 DNS Proxy

部署至 Azure
此範例示範如何使用 Azure 防火牆 在 Azure 中部署中樞輪輻拓撲。 中樞虛擬網路可作為透過虛擬網路對等互連連線到中樞虛擬網路之許多輪輻虛擬網路的連線中心點。
建立 Azure 防火牆、用戶端 VM 和伺服器 VM 的沙箱

部署至 Azure
此範本會建立具有 2 個子網的虛擬網路, (伺服器子網和 AzureFirewall 子網) 、伺服器 VM、用戶端 VM、每個 VM 的公用 IP 位址,以及路由表以透過防火牆傳送 VM 之間的流量。
使用規則和 Ipgroups 建立防火牆和 FirewallPolicy

部署至 Azure
此範本會部署具有防火牆原則 (的 Azure 防火牆,包括多個應用程式和網路規則,) 參考應用程式和網路規則中的IP群組。
使用明確 Proxy 建立防火牆 FirewallPolicy

部署至 Azure
此範本會使用 IpGroups 建立具有明確 Proxy 和網路規則的 Azure 防火牆 FirewalllPolicy。 此外,也包含Linux Jumpbox vm安裝程式
使用 FirewallPolicy 和 IpGroups 建立防火牆

部署至 Azure
此範本會建立具有 FirewalllPolicy 參考 IpGroups 網路規則的 Azure 防火牆。 此外,也包含Linux Jumpbox vm安裝程式
使用 IpGroups 建立 Azure 防火牆

部署至 Azure
此範本會使用參考IP群組的應用程式和網路規則來建立 Azure 防火牆。 此外,也包含Linux Jumpbox vm安裝程式
使用可用性區域建立 Azure 防火牆

部署至 Azure
此範本會建立具有 可用性區域 和虛擬網路中任意數目公用IP的 Azure 防火牆,並設定1個範例應用程式規則和1個範例網路規則
使用強制通道建立 Azure 防火牆 沙箱

部署至 Azure
此範本會建立 Azure 防火牆 沙箱 (Linux) ,其中一個防火牆強制透過對等互連 VNET 中的另一個防火牆進行通道
Azure 防火牆 Premium 的測試環境

部署至 Azure
此範本會建立具有進階功能的 Azure 防火牆 進階和防火牆原則,例如入侵檢測 (IDPS) 、TLS 檢查和 Web 類別篩選
使用 Linux VM 建立 Azure 防火牆 的沙箱設定

部署至 Azure
此範本會建立具有 3 個子網的虛擬網路, (伺服器子網、jumpbox 子集和 AzureFirewall 子網) 、具有公用 IP 的 jumpbox VM、伺服器 VM、UDR 路由,以指向伺服器子網的 Azure 防火牆,以及具有 1 或多個公用 IP 位址的 Azure 防火牆、1 個範例應用程式規則、1 個範例網路規則和預設私人範圍
使用防火牆原則建立沙箱設定

部署至 Azure
此範本會建立具有 3 個子網的虛擬網路, (伺服器子網、jumpbox 子集和 AzureFirewall 子網) 、具有公用 IP 的 jumpbox VM、伺服器 VM、UDR 路由,以指向伺服器子網的 Azure 防火牆,以及具有 1 或多個公用 IP 位址的 Azure 防火牆。 此外,也會建立具有 1 個範例應用程式規則、1 個範例網路規則和預設私人範圍的防火牆原則
使用區域建立 Azure 防火牆的沙箱設定

部署至 Azure
此範本會建立具有三個子網的虛擬網路, (伺服器子網、jumpbox 子網和 Azure 防火牆 子網) 、具有公用 IP 的 jumpbox VM、伺服器 VM、UDR 路由,以指向 ServerSubnet 的 Azure 防火牆、具有一或多個公用 IP 位址的 Azure 防火牆、一個範例應用程式規則,以及一個範例網路規則和 Azure 防火牆可用性區域 1、2 和 3。
建立具有多個公用 IP 位址的 Azure 防火牆

部署至 Azure
此範本會建立一個 Azure 防火牆,其中包含兩個公用IP位址和兩部 Windows Server 2019 伺服器進行測試。
安全虛擬中樞

部署至 Azure
此範本會使用 Azure 防火牆 建立安全的虛擬中樞,以保護目的地為因特網的雲端網路流量。
Azure Virtual WAN 路由意圖和原則

部署至 Azure
此範本會布建 Azure Virtual WAN,並啟用路由意圖和原則功能的兩個中樞。

ARM 範本資源定義

azureFirewalls 資源類型可以使用目標作業進行部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。

資源格式

若要建立 Microsoft.Network/azureFirewalls 資源,請將下列 JSON 新增至您的範本。

{
  "type": "Microsoft.Network/azureFirewalls",
  "apiVersion": "2023-04-01",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "properties": {
    "additionalProperties": {},
    "applicationRuleCollections": [
      {
        "id": "string",
        "name": "string",
        "properties": {
          "action": {
            "type": "string"
          },
          "priority": "int",
          "rules": [
            {
              "description": "string",
              "fqdnTags": [ "string" ],
              "name": "string",
              "protocols": [
                {
                  "port": "int",
                  "protocolType": "string"
                }
              ],
              "sourceAddresses": [ "string" ],
              "sourceIpGroups": [ "string" ],
              "targetFqdns": [ "string" ]
            }
          ]
        }
      }
    ],
    "firewallPolicy": {
      "id": "string"
    },
    "hubIPAddresses": {
      "privateIPAddress": "string",
      "publicIPs": {
        "addresses": [
          {
            "address": "string"
          }
        ],
        "count": "int"
      }
    },
    "ipConfigurations": [
      {
        "id": "string",
        "name": "string",
        "properties": {
          "publicIPAddress": {
            "id": "string"
          },
          "subnet": {
            "id": "string"
          }
        }
      }
    ],
    "managementIpConfiguration": {
      "id": "string",
      "name": "string",
      "properties": {
        "publicIPAddress": {
          "id": "string"
        },
        "subnet": {
          "id": "string"
        }
      }
    },
    "natRuleCollections": [
      {
        "id": "string",
        "name": "string",
        "properties": {
          "action": {
            "type": "string"
          },
          "priority": "int",
          "rules": [
            {
              "description": "string",
              "destinationAddresses": [ "string" ],
              "destinationPorts": [ "string" ],
              "name": "string",
              "protocols": [ "string" ],
              "sourceAddresses": [ "string" ],
              "sourceIpGroups": [ "string" ],
              "translatedAddress": "string",
              "translatedFqdn": "string",
              "translatedPort": "string"
            }
          ]
        }
      }
    ],
    "networkRuleCollections": [
      {
        "id": "string",
        "name": "string",
        "properties": {
          "action": {
            "type": "string"
          },
          "priority": "int",
          "rules": [
            {
              "description": "string",
              "destinationAddresses": [ "string" ],
              "destinationFqdns": [ "string" ],
              "destinationIpGroups": [ "string" ],
              "destinationPorts": [ "string" ],
              "name": "string",
              "protocols": [ "string" ],
              "sourceAddresses": [ "string" ],
              "sourceIpGroups": [ "string" ]
            }
          ]
        }
      }
    ],
    "sku": {
      "name": "string",
      "tier": "string"
    },
    "threatIntelMode": "string",
    "virtualHub": {
      "id": "string"
    }
  },
  "zones": [ "string" ]
}

屬性值

azureFirewalls

名稱 描述
類型 資源類型 'Microsoft.Network/azureFirewalls'
apiVersion 資源 API 版本 '2023-04-01'
NAME 資源名稱 需要字串 ()

字元限制:1-80

合法字元:
英數字元、底線、句號和連字號。

以英數字元開頭。 以英數字元或底線結尾。
location 資源位置。 字串
tags 資源標籤。 標記名稱和值的字典。 請參閱 範本中的標籤
properties Azure 防火牆的屬性。 AzureFirewallPropertiesFormat
zones (區域) 可用性區域清單,表示資源需要來自何處。 string[]

AzureFirewallPropertiesFormat

名稱 描述
additionalProperties 用來進一步設定此 Azure 防火牆的其他屬性。 物件 (object)
applicationRuleCollections Azure 防火牆 所使用的應用程式規則集合集合。 AzureFirewallApplicationRuleCollection[]
firewallPolicy 與此 Azure 防火牆相關聯的 firewallPolicy。 SubResource
hubIPAddresses 與 AzureFirewall 相關聯的 IP 位址。 HubIPAddresses
ipConfigurations Azure 防火牆 資源的IP組態。 AzureFirewallIPConfiguration[]
managementIpConfiguration 用於管理流量之 Azure 防火牆的IP組態。 AzureFirewallIPConfiguration
natRuleCollections Azure 防火牆 所使用的NAT規則集合集合。 AzureFirewallNatRuleCollection[]
networkRuleCollections Azure 防火牆 所使用的網路規則集合集合。 AzureFirewallNetworkRuleCollection[]
sku Azure 防火牆 資源 SKU。 AzureFirewallSku
threatIntelMode 威脅情報的作業模式。 'Alert'
'Deny'
'Off'
virtualHub 防火牆所屬的 virtualHub。 SubResource

AzureFirewallApplicationRuleCollection

名稱 描述
id 資源識別碼。 字串
NAME Azure 防火牆內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties Azure 防火牆應用程式規則集合的屬性。 AzureFirewallApplicationRuleCollectionPropertiesForm...

AzureFirewallApplicationRuleCollectionPropertiesForm...

名稱 描述
動作 規則集合的動作類型。 AzureFirewallRCAction
priority 應用程式規則集合資源的優先順序。 int
規則 應用程式規則集合所使用的規則集合。 AzureFirewallApplicationRule[]

AzureFirewallRCAction

名稱 描述
類型 動作的類型。 'Allow'
'Deny'

AzureFirewallApplicationRule

名稱 描述
description 規則的描述。 字串
fqdnTags 此規則的 FQDN 標籤清單。 string[]
NAME 應用程式規則的名稱。 字串
protocols ApplicationRuleProtocols 的陣列。 AzureFirewallApplicationRuleProtocol[]
sourceAddresses 此規則的來源IP位址清單。 string[]
sourceIpGroups 此規則的來源 IpGroup 清單。 string[]
targetFqdns 此規則的 FQDN 清單。 string[]

AzureFirewallApplicationRuleProtocol

名稱 描述
連接埠 通訊協定的埠號碼不能大於 64000。 這是選擇性欄位。 int
protocolType 通訊協定類型。 'Http'
'Https'
'Mssql'

SubResource

名稱 描述
id 資源識別碼。 字串

HubIPAddresses

名稱 描述
privateIPAddress 與 Azure 防火牆相關聯的私人 IP 位址。 字串
publicIPs 與 Azure 防火牆相關聯的公用 IP 位址。 HubPublicIPAddresses

HubPublicIPAddresses

名稱 描述
地址 與要保留的 Azure 防火牆或 IP 位址相關聯的公用 IP 位址清單。 AzureFirewallPublicIPAddress[]
計數 與 Azure 防火牆相關聯的公用 IP 位址數目。 int

AzureFirewallPublicIPAddress

名稱 描述
address 公用IP位址值。 字串

AzureFirewallIPConfiguration

名稱 描述
id 資源識別碼。 字串
NAME 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties Azure 防火牆 IP 組態的屬性。 AzureFirewallIPConfigurationPropertiesFormat

AzureFirewallIPConfigurationPropertiesFormat

名稱 描述
publicIPAddress PublicIP 資源的參考。 如果子網不是 Null,此字段是強制輸入。 SubResource
子網路 子網資源的參考。 此資源必須命名為 『AzureFirewallSubnet』 或 'AzureFirewallManagementSubnet'。 SubResource

AzureFirewallNatRuleCollection

名稱 描述
id 資源識別碼。 字串
NAME Azure 防火牆內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties Azure 防火牆 NAT 規則集合的屬性。 AzureFirewallNatRuleCollectionProperties

AzureFirewallNatRuleCollectionProperties

名稱 描述
動作 NAT 規則集合的動作類型。 AzureFirewallNatRCAction
priority NAT 規則集合資源的優先順序。 int
規則 NAT 規則集合所使用的規則集合。 AzureFirewallNatRule[]

AzureFirewallNatRCAction

名稱 描述
類型 動作的類型。 'Dnat'
'Snat'

AzureFirewallNatRule

名稱 描述
description 規則的描述。 字串
destinationAddresses 此規則的目的地IP位址清單。 支援IP範圍、前置詞和服務標籤。 string[]
destinationPorts 目的地埠清單。 string[]
NAME NAT 規則的名稱。 字串
protocols 適用於此 NAT 規則的 AzureFirewallNetworkRuleProtocols 陣列。 包含任何項目的字串數組:
'Any'
'ICMP'
'TCP'
'UDP'
sourceAddresses 此規則的來源IP位址清單。 string[]
sourceIpGroups 此規則的來源 IpGroup 清單。 string[]
translatedAddress 此 NAT 規則的轉譯位址。 字串
translatedFqdn 此 NAT 規則的翻譯 FQDN。 字串
translatedPort 此 NAT 規則的轉譯埠。 字串

AzureFirewallNetworkRuleCollection

名稱 描述
id 資源識別碼。 字串
NAME Azure 防火牆內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties Azure 防火牆網路規則集合的屬性。 AzureFirewallNetworkRuleCollectionPropertiesFormat

AzureFirewallNetworkRuleCollectionPropertiesFormat

名稱 描述
動作 規則集合的動作類型。 AzureFirewallRCAction
priority 網路規則集合資源的優先順序。 int
規則 網路規則集合所使用的規則集合。 AzureFirewallNetworkRule[]

AzureFirewallNetworkRule

名稱 描述
description 規則的描述。 字串
destinationAddresses 目的地IP位址清單。 string[]
destinationFqdns 目的地 FQDN 的清單。 string[]
destinationIpGroups 此規則的目的地 IpGroups 清單。 string[]
destinationPorts 目的地埠清單。 string[]
NAME 網路規則的名稱。 字串
protocols AzureFirewallNetworkRuleProtocols 的陣列。 包含任何項目的字串數組:
'Any'
'ICMP'
'TCP'
'UDP'
sourceAddresses 此規則的來源IP位址清單。 string[]
sourceIpGroups 此規則的來源 IpGroup 清單。 string[]

AzureFirewallSku

名稱 描述
NAME Azure 防火牆 SKU 的名稱。 'AZFW_Hub'
'AZFW_VNet'
tier Azure 防火牆 層。 'Basic'
'Premium'
'Standard'

快速入門範本

下列快速入門範本會部署此資源類型。

範本 描述
使用 Azure 防火牆 作為中樞 & 輪輻拓撲中的 DNS Proxy

部署至 Azure
此範例示範如何使用 Azure 防火牆 在 Azure 中部署中樞輪輻拓撲。 中樞虛擬網路可作為透過虛擬網路對等互連連線到中樞虛擬網路的許多輪輻虛擬網路的中央點。
建立 Azure 防火牆、用戶端 VM 和伺服器 VM 的沙箱

部署至 Azure
此範本會建立具有 2 個子網的虛擬網路, (伺服器子網和 AzureFirewall 子網) 、伺服器 VM、用戶端 VM、每個 VM 的公用 IP 位址,以及透過防火牆傳送 VM 之間的流量路由表。
使用規則和 Ipgroups 建立防火牆和 FirewallPolicy

部署至 Azure
此範本會部署具有防火牆原則 (的 Azure 防火牆,包括多個應用程式和網路規則) 參考應用程式和網路規則中的 IP 群組。
使用明確 Proxy 建立防火牆 FirewallPolicy

部署至 Azure
此範本會使用 IpGroups 建立具有明確 Proxy 和網路規則的 Azure 防火牆 FirewalllPolicy。 此外,也包含Linux Jumpbox vm安裝程式
使用 FirewallPolicy 和 IpGroups 建立防火牆

部署至 Azure
此範本會建立 Azure 防火牆,其中包含使用 IpGroups 參考網路規則的 FirewalllPolicy。 此外,也包含Linux Jumpbox vm安裝程式
使用 IpGroups 建立 Azure 防火牆

部署至 Azure
此範本會使用參考IP群組的應用程式和網路規則來建立 Azure 防火牆。 此外,也包含Linux Jumpbox vm安裝程式
使用可用性區域建立 Azure 防火牆

部署至 Azure
此範本會建立具有 可用性區域 和虛擬網路中任意數目公用IP的 Azure 防火牆,並設定1個範例應用程式規則和1個範例網路規則
使用強制通道建立 Azure 防火牆 沙箱

部署至 Azure
此範本會建立 Azure 防火牆 沙箱 (Linux) ,其中一個防火牆強制透過對等互連 VNET 中的另一個防火牆進行通道
Azure 防火牆 Premium 的測試環境

部署至 Azure
此範本會建立具有進階功能的 Azure 防火牆 進階和防火牆原則,例如入侵檢測 (IDPS) 、TLS 檢查和 Web 類別篩選
使用 Linux VM 建立 Azure 防火牆 的沙箱設定

部署至 Azure
此範本會建立具有 3 個子網的虛擬網路, (伺服器子網、jumpbox 子集和 AzureFirewall 子網) 、具有公用 IP 的 jumpbox VM、伺服器 VM、UDR 路由,以指向伺服器子網的 Azure 防火牆,以及具有 1 或多個公用 IP 位址的 Azure 防火牆、1 個範例應用程式規則、1 個範例網路規則和預設私人範圍
使用防火牆原則建立沙箱設定

部署至 Azure
此範本會建立具有 3 個子網的虛擬網路, (伺服器子網、jumpbox 子集和 AzureFirewall 子網) 、具有公用 IP 的 jumpbox VM、伺服器 VM、UDR 路由,以指向伺服器子網的 Azure 防火牆,以及具有 1 或多個公用 IP 位址的 Azure 防火牆。 此外,也會建立具有 1 個範例應用程式規則、1 個範例網路規則和預設私人範圍的防火牆原則
使用區域建立 Azure 防火牆的沙箱設定

部署至 Azure
此範本會建立具有三個子網的虛擬網路 (伺服器子網、jumpbox 子網和 Azure 防火牆 子網) 、具有公用 IP 的 jumpbox VM、伺服器 VM、UDR 路由,以指向 ServerSubnet 的 Azure 防火牆、具有一或多個公用 IP 位址的 Azure 防火牆、一個範例應用程式規則,以及一個範例網路規則和 Azure 防火牆可用性區域 1、2 和 3。
建立具有多個公用 IP 位址的 Azure 防火牆

部署至 Azure
此範本會建立一個 Azure 防火牆,其中包含兩個公用IP位址和兩部 Windows Server 2019 伺服器進行測試。
安全虛擬中樞

部署至 Azure
此範本會使用 Azure 防火牆 建立安全的虛擬中樞,以保護目的地為因特網的雲端網路流量。
Azure Virtual WAN 路由意圖和原則

部署至 Azure
此範本會布建 Azure Virtual WAN,並啟用路由意圖和原則功能的兩個中樞。

Terraform (AzAPI 提供者) 資源定義

azureFirewalls 資源類型可以使用目標作業進行部署:

  • 資源群組

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。

資源格式

若要建立 Microsoft.Network/azureFirewalls 資源,請將下列 Terraform 新增至範本。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Network/azureFirewalls@2023-04-01"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  body = jsonencode({
    properties = {
      additionalProperties = {}
      applicationRuleCollections = [
        {
          id = "string"
          name = "string"
          properties = {
            action = {
              type = "string"
            }
            priority = int
            rules = [
              {
                description = "string"
                fqdnTags = [
                  "string"
                ]
                name = "string"
                protocols = [
                  {
                    port = int
                    protocolType = "string"
                  }
                ]
                sourceAddresses = [
                  "string"
                ]
                sourceIpGroups = [
                  "string"
                ]
                targetFqdns = [
                  "string"
                ]
              }
            ]
          }
        }
      ]
      firewallPolicy = {
        id = "string"
      }
      hubIPAddresses = {
        privateIPAddress = "string"
        publicIPs = {
          addresses = [
            {
              address = "string"
            }
          ]
          count = int
        }
      }
      ipConfigurations = [
        {
          id = "string"
          name = "string"
          properties = {
            publicIPAddress = {
              id = "string"
            }
            subnet = {
              id = "string"
            }
          }
        }
      ]
      managementIpConfiguration = {
        id = "string"
        name = "string"
        properties = {
          publicIPAddress = {
            id = "string"
          }
          subnet = {
            id = "string"
          }
        }
      }
      natRuleCollections = [
        {
          id = "string"
          name = "string"
          properties = {
            action = {
              type = "string"
            }
            priority = int
            rules = [
              {
                description = "string"
                destinationAddresses = [
                  "string"
                ]
                destinationPorts = [
                  "string"
                ]
                name = "string"
                protocols = [
                  "string"
                ]
                sourceAddresses = [
                  "string"
                ]
                sourceIpGroups = [
                  "string"
                ]
                translatedAddress = "string"
                translatedFqdn = "string"
                translatedPort = "string"
              }
            ]
          }
        }
      ]
      networkRuleCollections = [
        {
          id = "string"
          name = "string"
          properties = {
            action = {
              type = "string"
            }
            priority = int
            rules = [
              {
                description = "string"
                destinationAddresses = [
                  "string"
                ]
                destinationFqdns = [
                  "string"
                ]
                destinationIpGroups = [
                  "string"
                ]
                destinationPorts = [
                  "string"
                ]
                name = "string"
                protocols = [
                  "string"
                ]
                sourceAddresses = [
                  "string"
                ]
                sourceIpGroups = [
                  "string"
                ]
              }
            ]
          }
        }
      ]
      sku = {
        name = "string"
        tier = "string"
      }
      threatIntelMode = "string"
      virtualHub = {
        id = "string"
      }
    }
    zones = [
      "string"
    ]
  })
}

屬性值

azureFirewalls

名稱 描述
類型 資源類型 “Microsoft.Network/azureFirewalls@2023-04-01”
NAME 資源名稱 需要字串 ()

字元限制:1-80

合法字元:
英數字元、底線、句號和連字號。

以英數字元開頭。 以英數字元或底線結尾。
location 資源位置。 字串
parent_id 若要部署至資源群組,請使用該資源群組的標識碼。 需要字串 ()
tags 資源標籤。 標記名稱和值的字典。
properties Azure 防火牆的屬性。 AzureFirewallPropertiesFormat
zones (區域) 可用性區域清單,表示資源需要來自何處。 string[]

AzureFirewallPropertiesFormat

名稱 描述
additionalProperties 用來進一步設定此 Azure 防火牆的其他屬性。 物件 (object)
applicationRuleCollections Azure 防火牆 所使用的應用程式規則集合集合。 AzureFirewallApplicationRuleCollection[]
firewallPolicy 與此 Azure 防火牆相關聯的 firewallPolicy。 SubResource
hubIPAddresses 與 AzureFirewall 相關聯的 IP 位址。 HubIPAddresses
ipConfigurations Azure 防火牆 資源的IP組態。 AzureFirewallIPConfiguration[]
managementIpConfiguration 用於管理流量之 Azure 防火牆的IP組態。 AzureFirewallIPConfiguration
natRuleCollections Azure 防火牆 所使用的NAT規則集合集合。 AzureFirewallNatRuleCollection[]
networkRuleCollections Azure 防火牆 所使用的網路規則集合集合。 AzureFirewallNetworkRuleCollection[]
sku Azure 防火牆 資源 SKU。 AzureFirewallSku
threatIntelMode 威脅情報的作業模式。 “Alert”
“Deny”
“Off”
virtualHub 防火牆所屬的 virtualHub。 SubResource

AzureFirewallApplicationRuleCollection

名稱 描述
id 資源識別碼。 字串
NAME Azure 防火牆內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties Azure 防火牆應用程式規則集合的屬性。 AzureFirewallApplicationRuleCollectionPropertiesForm...

AzureFirewallApplicationRuleCollectionPropertiesForm...

名稱 描述
動作 規則集合的動作類型。 AzureFirewallRCAction
priority 應用程式規則集合資源的優先順序。 int
規則 應用程式規則集合所使用的規則集合。 AzureFirewallApplicationRule[]

AzureFirewallRCAction

名稱 描述
類型 動作的類型。 “Allow”
“Deny”

AzureFirewallApplicationRule

名稱 描述
description 規則的描述。 字串
fqdnTags 此規則的 FQDN 標籤清單。 string[]
NAME 應用程式規則的名稱。 字串
protocols ApplicationRuleProtocols 的陣列。 AzureFirewallApplicationRuleProtocol[]
sourceAddresses 此規則的來源IP位址清單。 string[]
sourceIpGroups 此規則的來源 IpGroup 清單。 string[]
targetFqdns 此規則的 FQDN 清單。 string[]

AzureFirewallApplicationRuleProtocol

名稱 描述
連接埠 通訊協定的埠號碼不能大於 64000。 這是選擇性欄位。 int
protocolType 通訊協定類型。 “Http”
“Https”
“Mssql”

SubResource

名稱 描述
id 資源識別碼。 字串

HubIPAddresses

名稱 描述
privateIPAddress 與 Azure 防火牆相關聯的私人 IP 位址。 字串
publicIPs 與 Azure 防火牆相關聯的公用 IP 位址。 HubPublicIPAddresses

HubPublicIPAddresses

名稱 描述
地址 與要保留的 Azure 防火牆或 IP 位址相關聯的公用 IP 位址清單。 AzureFirewallPublicIPAddress[]
計數 與 Azure 防火牆相關聯的公用 IP 位址數目。 int

AzureFirewallPublicIPAddress

名稱 描述
address 公用IP位址值。 字串

AzureFirewallIPConfiguration

名稱 描述
id 資源識別碼。 字串
NAME 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties Azure 防火牆 IP 組態的屬性。 AzureFirewallIPConfigurationPropertiesFormat

AzureFirewallIPConfigurationPropertiesFormat

名稱 描述
publicIPAddress PublicIP 資源的參考。 如果子網不是 Null,則此字段是強制輸入。 SubResource
子網路 子網資源的參考。 此資源必須命名為 『AzureFirewallSubnet』 或 'AzureFirewallManagementSubnet'。 SubResource

AzureFirewallNatRuleCollection

名稱 描述
id 資源識別碼。 字串
NAME Azure 防火牆內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties Azure 防火牆 NAT 規則集合的屬性。 AzureFirewallNatRuleCollectionProperties

AzureFirewallNatRuleCollectionProperties

名稱 描述
動作 NAT 規則集合的動作類型。 AzureFirewallNatRCAction
priority NAT 規則集合資源的優先順序。 int
規則 NAT 規則集合所使用的規則集合。 AzureFirewallNatRule[]

AzureFirewallNatRCAction

名稱 描述
類型 動作的類型。 “Dnat”
“Snat”

AzureFirewallNatRule

名稱 描述
description 規則的描述。 字串
destinationAddresses 此規則的目的地IP位址清單。 支援IP範圍、前置詞和服務標籤。 string[]
destinationPorts 目的地埠清單。 string[]
NAME NAT 規則的名稱。 字串
protocols 適用於此 NAT 規則的 AzureFirewallNetworkRuleProtocols 陣列。 包含任何項目的字串數組:
“Any”
“ICMP”
“TCP”
“UDP”
sourceAddresses 此規則的來源IP位址清單。 string[]
sourceIpGroups 此規則的來源 IpGroup 清單。 string[]
translatedAddress 此 NAT 規則的已轉譯位址。 字串
translatedFqdn 此 NAT 規則的已翻譯 FQDN。 字串
translatedPort 此 NAT 規則的已轉譯埠。 字串

AzureFirewallNetworkRuleCollection

名稱 描述
id 資源識別碼。 字串
NAME Azure 防火牆內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties Azure 防火牆網路規則集合的屬性。 AzureFirewallNetworkRuleCollectionPropertiesFormat

AzureFirewallNetworkRuleCollectionPropertiesFormat

名稱 描述
動作 規則集合的動作類型。 AzureFirewallRCAction
priority 網路規則集合資源的優先順序。 int
規則 網路規則集合所使用的規則集合。 AzureFirewallNetworkRule[]

AzureFirewallNetworkRule

名稱 描述
description 規則的描述。 字串
destinationAddresses 目的地IP位址清單。 string[]
destinationFqdns 目的地 FQDN 的清單。 string[]
destinationIpGroups 此規則的目的地 IpGroups 清單。 string[]
destinationPorts 目的地埠清單。 string[]
NAME 網路規則的名稱。 字串
protocols AzureFirewallNetworkRuleProtocols 的陣列。 包含任何項目的字串數組:
“Any”
“ICMP”
“TCP”
“UDP”
sourceAddresses 此規則的來源IP位址清單。 string[]
sourceIpGroups 此規則的來源 IpGroup 清單。 string[]

AzureFirewallSku

名稱 描述
NAME Azure 防火牆 SKU 的名稱。 “AZFW_Hub”
“AZFW_VNet”
tier Azure 防火牆 層。 "Basic"
“Premium”
“標準”