你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Microsoft.Network firewallPolicies 2023-06-01

Bicep 资源定义

可以使用目标操作部署 firewallPolicies 资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.Network/firewallPolicies 资源,请将以下 Bicep 添加到模板。

resource symbolicname 'Microsoft.Network/firewallPolicies@2023-06-01' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  identity: {
    type: 'string'
    userAssignedIdentities: {
      {customized property}: {}
    }
  }
  properties: {
    basePolicy: {
      id: 'string'
    }
    dnsSettings: {
      enableProxy: bool
      requireProxyForNetworkRules: bool
      servers: [
        'string'
      ]
    }
    explicitProxy: {
      enableExplicitProxy: bool
      enablePacFile: bool
      httpPort: int
      httpsPort: int
      pacFile: 'string'
      pacFilePort: int
    }
    insights: {
      isEnabled: bool
      logAnalyticsResources: {
        defaultWorkspaceId: {
          id: 'string'
        }
        workspaces: [
          {
            region: 'string'
            workspaceId: {
              id: 'string'
            }
          }
        ]
      }
      retentionDays: int
    }
    intrusionDetection: {
      configuration: {
        bypassTrafficSettings: [
          {
            description: 'string'
            destinationAddresses: [
              'string'
            ]
            destinationIpGroups: [
              'string'
            ]
            destinationPorts: [
              'string'
            ]
            name: 'string'
            protocol: 'string'
            sourceAddresses: [
              'string'
            ]
            sourceIpGroups: [
              'string'
            ]
          }
        ]
        privateRanges: [
          'string'
        ]
        signatureOverrides: [
          {
            id: 'string'
            mode: 'string'
          }
        ]
      }
      mode: 'string'
      profile: 'string'
    }
    sku: {
      tier: 'string'
    }
    snat: {
      autoLearnPrivateRanges: 'string'
      privateRanges: [
        'string'
      ]
    }
    sql: {
      allowSqlRedirect: bool
    }
    threatIntelMode: 'string'
    threatIntelWhitelist: {
      fqdns: [
        'string'
      ]
      ipAddresses: [
        'string'
      ]
    }
    transportSecurity: {
      certificateAuthority: {
        keyVaultSecretId: 'string'
        name: 'string'
      }
    }
  }
}

属性值

firewallPolicies

名字 描述 价值
名字 资源名称 string (必需)

字符限制:1-80

有效字符:
字母数字、下划线、句点和连字符。

从字母数字开始。 结束字母数字或下划线。
位置 资源位置。 字符串
标签 资源标记。 标记名称和值的字典。 请参阅模板 中的 标记
身份 防火墙策略的标识。 ManagedServiceIdentity
性能 防火墙策略的属性。 FirewallPolicyPropertiesFormat

ManagedServiceIdentity

名字 描述 价值
类型 用于资源的标识类型。 类型“SystemAssigned,UserAssigned”包括隐式创建的标识和一组用户分配的标识。 类型“None”将从虚拟机中删除任何标识。 “None”
“SystemAssigned”
“SystemAssigned,UserAssigned”
“UserAssigned”
userAssignedIdentities 与资源关联的用户标识列表。 用户标识字典密钥引用的格式为 ARM 资源 ID:“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。 ManagedServiceIdentityUserAssignedIdentities

ManagedServiceIdentityUserAssignedIdentities

名字 描述 价值
{自定义属性} Components1Jq1T4ISchemasManagedserviceidentityProper...

Components1Jq1T4ISchemasManagedserviceidentityProper...

此对象不包含在部署期间设置的任何属性。 所有属性都是 ReadOnly。

FirewallPolicyPropertiesFormat

名字 描述 价值
basePolicy 继承规则的父防火墙策略。 SubResource
dnsSettings DNS 代理设置定义。 DnsSettings
explicitProxy 显式代理设置定义。 ExplicitProxy
见解 有关防火墙策略的见解。 FirewallPolicyInsights
intrusionDetection 入侵检测的配置。 FirewallPolicyIntrusionDetection
sku 防火墙策略 SKU。 FirewallPolicySku
snat 流量不会为 SNAT 的专用 IP 地址/IP 范围。 FirewallPolicySnat
sql SQL 设置定义。 FirewallPolicySQL
threatIntelMode 威胁智能的操作模式。 “Alert”
“拒绝”
“关闭”
threatIntelWhitelist Firewall Policy 的 ThreatIntel Allowlist。 FirewallPolicyThreatIntelWhitelist
transportSecurity TLS 配置定义。 FirewallPolicyTransportSecurity

SubResource

名字 描述 价值
id 资源 ID。 字符串

DnsSettings

名字 描述 价值
enableProxy 在附加到防火墙策略的防火墙上启用 DNS 代理。 bool
requireProxyForNetworkRules 当设置为 true 时,支持网络规则中的 FQDN。 bool
服务器 自定义 DNS 服务器列表。 string[]

ExplicitProxy

名字 描述 价值
enableExplicitProxy 设置为 true 时,将启用显式代理模式。 bool
enablePacFile 如果设置为 true,则需要提供 pac 文件端口和 URL。 bool
httpPort 显式代理 http 协议的端口号不能大于 64000。 int

约束:
最小值 = 0
最大值 = 64000
httpsPort 显式代理 https 协议的端口号不能大于 64000。 int

约束:
最小值 = 0
最大值 = 64000
pacFile PAC 文件的 SAS URL。 字符串
pacFilePort 要为 PAC 文件提供服务的防火墙的端口号。 int

约束:
最小值 = 0
最大值 = 64000

FirewallPolicyInsights

名字 描述 价值
isEnabled 一个标志,用于指示是否对策略启用了见解。 bool
logAnalyticsResources 配置防火墙策略见解所需的工作区。 FirewallPolicyLogAnalyticsResources
retentionDays 应在策略上启用见解的天数。 int

FirewallPolicyLogAnalyticsResources

名字 描述 价值
defaultWorkspaceId 防火墙策略见解的默认工作区 ID。 SubResource
workspaces 防火墙策略见解的工作区列表。 FirewallPolicyLogAnalyticsWorkspace[]

FirewallPolicyLogAnalyticsWorkspace

名字 描述 价值
地区 要配置工作区的区域。 字符串
workspaceId 防火墙策略见解的工作区 ID。 SubResource

FirewallPolicyIntrusionDetection

名字 描述 价值
配置 入侵检测配置属性。 FirewallPolicyIntrusionDetectionConfiguration
模式 入侵检测常规状态。 附加到父策略时,防火墙的有效 IDPS 模式是两者更严格的模式。 “Alert”
“拒绝”
“关闭”
轮廓 IDPS 配置文件名称。 附加到父策略时,防火墙的有效配置文件是父策略的配置文件名称。 “Advanced”
“Basic”
“Extended”
“Standard”

FirewallPolicyIntrusionDetectionConfiguration

名字 描述 价值
bypassTrafficSettings 要绕过的流量的规则列表。 FirewallPolicyIntrusionDetectionBypassTrafficSpecifi...[]
privateRanges IDPS 专用 IP 地址范围用于标识流量方向(例如入站、出站等)。 默认情况下,仅 IANA RFC 1918 定义的范围被视为专用 IP 地址。 若要修改默认范围,请使用此属性指定专用 IP 地址范围 string[]
signatureOverrides 特定签名状态的列表。 FirewallPolicyIntrusionDetectionSignatureSpecificati...[]

FirewallPolicyIntrusionDetectionBypassTrafficSpecifi...

名字 描述 价值
描述 绕过流量规则的说明。 字符串
destinationAddresses 此规则的目标 IP 地址或范围列表。 string[]
destinationIpGroups 此规则的目标 IpGroup 列表。 string[]
destinationPorts 目标端口或范围的列表。 string[]
名字 绕过流量规则的名称。 字符串
协议 规则绕过协议。 “ANY”
“ICMP”
“TCP”
“UDP”
sourceAddresses 此规则的源 IP 地址或范围列表。 string[]
sourceIpGroups 此规则的源 IpGroup 列表。 string[]

FirewallPolicyIntrusionDetectionSignatureSpecificati...

名字 描述 价值
id 签名 ID。 字符串
模式 签名状态。 “Alert”
“拒绝”
“关闭”

FirewallPolicySku

名字 描述 价值
防火墙策略的层。 “Basic”
“Premium”
“Standard”

FirewallPolicySnat

名字 描述 价值
autoLearnPrivateRanges 用于自动学习专用范围的操作模式不是 SNAT “Disabled”
“Enabled”
privateRanges 非 SNAT 的专用 IP 地址/IP 地址范围列表。 string[]

FirewallPolicySQL

名字 描述 价值
allowSqlRedirect 指示是否启用了 SQL 重定向流量筛选的标志。 启用标志不需要使用端口 11000-11999 的规则。 bool

FirewallPolicyThreatIntelWhitelist

名字 描述 价值
fqdns ThreatIntel Allowlist 的 FQDN 列表。 string[]
ipAddresses ThreatIntel Allowlist 的 IP 地址列表。 string[]

FirewallPolicyTransportSecurity

名字 描述 价值
certificateAuthority 用于中间 CA 生成的 CA。 FirewallPolicyCertificateAuthority

FirewallPolicyCertificateAuthority

名字 描述 价值
keyVaultSecretId 存储在 KeyVault 中的“Secret”或“Certificate”对象的机密 ID(base-64 编码的未加密 pfx)。 字符串
名字 CA 证书的名称。 字符串

快速入门模板

以下快速入门模板部署此资源类型。

模板 描述
SharePoint 订阅/ 2019 / 2016 完全配置

部署到 Azure
创建 DC、SQL Server 2022 和从 1 到 5 个服务器(s)托管 SharePoint 订阅/2019 / 2016 场,其中包含大量配置,包括受信任的身份验证、具有个人网站的用户配置文件、OAuth 信任(使用证书)、用于托管高信任外接程序的专用 IIS 站点,等等。已安装最新版本的密钥软件(包括 Fiddler、vscode、np++、7zip、ULS 查看器)。 SharePoint 计算机具有其他微调功能,使它们立即可用(远程管理工具、Edge 和 Chrome 的自定义策略、快捷方式等)。
使用 Azure 防火墙作为中心 & 辐射型拓扑中的 DNS 代理

部署到 Azure
此示例演示如何使用 Azure 防火墙在 Azure 中部署中心辐射型拓扑。 中心虚拟网络充当通过虚拟网络对等互连连接到中心虚拟网络的许多辐射虚拟网络的中心点。
使用规则和 Ipgroups 创建防火墙和 FirewallPolicy

部署到 Azure
此模板部署包含防火墙策略(包括多个应用程序和网络规则)的 Azure 防火墙,该防火墙引用了应用程序和网络规则中的 IP 组。
使用显式代理创建防火墙、FirewallPolicy

部署到 Azure
此模板使用 IpGroups 的显式代理和网络规则创建 Azure 防火墙、FirewalllPolicy。 此外,还包括 Linux Jumpbox vm 设置
使用 FirewallPolicy 和 IpGroups 创建防火墙

部署到 Azure
此模板创建一个包含 FirewalllPolicy 的 Azure 防火墙,该防火墙引用了 IpGroups 的网络规则。 此外,还包括 Linux Jumpbox vm 设置
Azure 防火墙高级版 的 测试环境

部署到 Azure
此模板创建具有高级功能(例如入侵检查检测(IDPS)、TLS 检查和 Web 类别筛选等高级功能的 Azure 防火墙高级和防火墙策略
使用防火墙策略 创建沙盒设置

部署到 Azure
此模板创建包含 3 个子网(服务器子网、jumpbox 子集和 AzureFirewall 子网)的虚拟网络、具有公共 IP 的 jumpbox VM、服务器 VM、UDR 路由,以指向服务器子网的 Azure 防火墙以及具有 1 个或多个公共 IP 地址的 Azure 防火墙。 此外,还创建包含 1 个示例应用程序规则、1 个示例网络规则和默认专用范围的防火墙策略
安全虚拟中心

部署到 Azure
此模板使用 Azure 防火墙创建安全的虚拟中心,以保护发往 Internet 的云网络流量。

ARM 模板资源定义

可以使用目标操作部署 firewallPolicies 资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.Network/firewallPolicies 资源,请将以下 JSON 添加到模板。

{
  "type": "Microsoft.Network/firewallPolicies",
  "apiVersion": "2023-06-01",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "identity": {
    "type": "string",
    "userAssignedIdentities": {
      "{customized property}": {}
    }
  },
  "properties": {
    "basePolicy": {
      "id": "string"
    },
    "dnsSettings": {
      "enableProxy": "bool",
      "requireProxyForNetworkRules": "bool",
      "servers": [ "string" ]
    },
    "explicitProxy": {
      "enableExplicitProxy": "bool",
      "enablePacFile": "bool",
      "httpPort": "int",
      "httpsPort": "int",
      "pacFile": "string",
      "pacFilePort": "int"
    },
    "insights": {
      "isEnabled": "bool",
      "logAnalyticsResources": {
        "defaultWorkspaceId": {
          "id": "string"
        },
        "workspaces": [
          {
            "region": "string",
            "workspaceId": {
              "id": "string"
            }
          }
        ]
      },
      "retentionDays": "int"
    },
    "intrusionDetection": {
      "configuration": {
        "bypassTrafficSettings": [
          {
            "description": "string",
            "destinationAddresses": [ "string" ],
            "destinationIpGroups": [ "string" ],
            "destinationPorts": [ "string" ],
            "name": "string",
            "protocol": "string",
            "sourceAddresses": [ "string" ],
            "sourceIpGroups": [ "string" ]
          }
        ],
        "privateRanges": [ "string" ],
        "signatureOverrides": [
          {
            "id": "string",
            "mode": "string"
          }
        ]
      },
      "mode": "string",
      "profile": "string"
    },
    "sku": {
      "tier": "string"
    },
    "snat": {
      "autoLearnPrivateRanges": "string",
      "privateRanges": [ "string" ]
    },
    "sql": {
      "allowSqlRedirect": "bool"
    },
    "threatIntelMode": "string",
    "threatIntelWhitelist": {
      "fqdns": [ "string" ],
      "ipAddresses": [ "string" ]
    },
    "transportSecurity": {
      "certificateAuthority": {
        "keyVaultSecretId": "string",
        "name": "string"
      }
    }
  }
}

属性值

firewallPolicies

名字 描述 价值
类型 资源类型 “Microsoft.Network/firewallPolicies”
apiVersion 资源 API 版本 '2023-06-01'
名字 资源名称 string (必需)

字符限制:1-80

有效字符:
字母数字、下划线、句点和连字符。

从字母数字开始。 结束字母数字或下划线。
位置 资源位置。 字符串
标签 资源标记。 标记名称和值的字典。 请参阅模板 中的 标记
身份 防火墙策略的标识。 ManagedServiceIdentity
性能 防火墙策略的属性。 FirewallPolicyPropertiesFormat

ManagedServiceIdentity

名字 描述 价值
类型 用于资源的标识类型。 类型“SystemAssigned,UserAssigned”包括隐式创建的标识和一组用户分配的标识。 类型“None”将从虚拟机中删除任何标识。 “None”
“SystemAssigned”
“SystemAssigned,UserAssigned”
“UserAssigned”
userAssignedIdentities 与资源关联的用户标识列表。 用户标识字典密钥引用的格式为 ARM 资源 ID:“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。 ManagedServiceIdentityUserAssignedIdentities

ManagedServiceIdentityUserAssignedIdentities

名字 描述 价值
{自定义属性} Components1Jq1T4ISchemasManagedserviceidentityProper...

Components1Jq1T4ISchemasManagedserviceidentityProper...

此对象不包含在部署期间设置的任何属性。 所有属性都是 ReadOnly。

FirewallPolicyPropertiesFormat

名字 描述 价值
basePolicy 继承规则的父防火墙策略。 SubResource
dnsSettings DNS 代理设置定义。 DnsSettings
explicitProxy 显式代理设置定义。 ExplicitProxy
见解 有关防火墙策略的见解。 FirewallPolicyInsights
intrusionDetection 入侵检测的配置。 FirewallPolicyIntrusionDetection
sku 防火墙策略 SKU。 FirewallPolicySku
snat 流量不会为 SNAT 的专用 IP 地址/IP 范围。 FirewallPolicySnat
sql SQL 设置定义。 FirewallPolicySQL
threatIntelMode 威胁智能的操作模式。 “Alert”
“拒绝”
“关闭”
threatIntelWhitelist Firewall Policy 的 ThreatIntel Allowlist。 FirewallPolicyThreatIntelWhitelist
transportSecurity TLS 配置定义。 FirewallPolicyTransportSecurity

SubResource

名字 描述 价值
id 资源 ID。 字符串

DnsSettings

名字 描述 价值
enableProxy 在附加到防火墙策略的防火墙上启用 DNS 代理。 bool
requireProxyForNetworkRules 当设置为 true 时,支持网络规则中的 FQDN。 bool
服务器 自定义 DNS 服务器列表。 string[]

ExplicitProxy

名字 描述 价值
enableExplicitProxy 设置为 true 时,将启用显式代理模式。 bool
enablePacFile 如果设置为 true,则需要提供 pac 文件端口和 URL。 bool
httpPort 显式代理 http 协议的端口号不能大于 64000。 int

约束:
最小值 = 0
最大值 = 64000
httpsPort 显式代理 https 协议的端口号不能大于 64000。 int

约束:
最小值 = 0
最大值 = 64000
pacFile PAC 文件的 SAS URL。 字符串
pacFilePort 要为 PAC 文件提供服务的防火墙的端口号。 int

约束:
最小值 = 0
最大值 = 64000

FirewallPolicyInsights

名字 描述 价值
isEnabled 一个标志,用于指示是否对策略启用了见解。 bool
logAnalyticsResources 配置防火墙策略见解所需的工作区。 FirewallPolicyLogAnalyticsResources
retentionDays 应在策略上启用见解的天数。 int

FirewallPolicyLogAnalyticsResources

名字 描述 价值
defaultWorkspaceId 防火墙策略见解的默认工作区 ID。 SubResource
workspaces 防火墙策略见解的工作区列表。 FirewallPolicyLogAnalyticsWorkspace[]

FirewallPolicyLogAnalyticsWorkspace

名字 描述 价值
地区 要配置工作区的区域。 字符串
workspaceId 防火墙策略见解的工作区 ID。 SubResource

FirewallPolicyIntrusionDetection

名字 描述 价值
配置 入侵检测配置属性。 FirewallPolicyIntrusionDetectionConfiguration
模式 入侵检测常规状态。 附加到父策略时,防火墙的有效 IDPS 模式是两者更严格的模式。 “Alert”
“拒绝”
“关闭”
轮廓 IDPS 配置文件名称。 附加到父策略时,防火墙的有效配置文件是父策略的配置文件名称。 “Advanced”
“Basic”
“Extended”
“Standard”

FirewallPolicyIntrusionDetectionConfiguration

名字 描述 价值
bypassTrafficSettings 要绕过的流量的规则列表。 FirewallPolicyIntrusionDetectionBypassTrafficSpecifi...[]
privateRanges IDPS 专用 IP 地址范围用于标识流量方向(例如入站、出站等)。 默认情况下,仅 IANA RFC 1918 定义的范围被视为专用 IP 地址。 若要修改默认范围,请使用此属性指定专用 IP 地址范围 string[]
signatureOverrides 特定签名状态的列表。 FirewallPolicyIntrusionDetectionSignatureSpecificati...[]

FirewallPolicyIntrusionDetectionBypassTrafficSpecifi...

名字 描述 价值
描述 绕过流量规则的说明。 字符串
destinationAddresses 此规则的目标 IP 地址或范围列表。 string[]
destinationIpGroups 此规则的目标 IpGroup 列表。 string[]
destinationPorts 目标端口或范围的列表。 string[]
名字 绕过流量规则的名称。 字符串
协议 规则绕过协议。 “ANY”
“ICMP”
“TCP”
“UDP”
sourceAddresses 此规则的源 IP 地址或范围列表。 string[]
sourceIpGroups 此规则的源 IpGroup 列表。 string[]

FirewallPolicyIntrusionDetectionSignatureSpecificati...

名字 描述 价值
id 签名 ID。 字符串
模式 签名状态。 “Alert”
“拒绝”
“关闭”

FirewallPolicySku

名字 描述 价值
防火墙策略的层。 “Basic”
“Premium”
“Standard”

FirewallPolicySnat

名字 描述 价值
autoLearnPrivateRanges 用于自动学习专用范围的操作模式不是 SNAT “Disabled”
“Enabled”
privateRanges 非 SNAT 的专用 IP 地址/IP 地址范围列表。 string[]

FirewallPolicySQL

名字 描述 价值
allowSqlRedirect 指示是否启用了 SQL 重定向流量筛选的标志。 启用标志不需要使用端口 11000-11999 的规则。 bool

FirewallPolicyThreatIntelWhitelist

名字 描述 价值
fqdns ThreatIntel Allowlist 的 FQDN 列表。 string[]
ipAddresses ThreatIntel Allowlist 的 IP 地址列表。 string[]

FirewallPolicyTransportSecurity

名字 描述 价值
certificateAuthority 用于中间 CA 生成的 CA。 FirewallPolicyCertificateAuthority

FirewallPolicyCertificateAuthority

名字 描述 价值
keyVaultSecretId 存储在 KeyVault 中的“Secret”或“Certificate”对象的机密 ID(base-64 编码的未加密 pfx)。 字符串
名字 CA 证书的名称。 字符串

快速入门模板

以下快速入门模板部署此资源类型。

模板 描述
SharePoint 订阅/ 2019 / 2016 完全配置

部署到 Azure
创建 DC、SQL Server 2022 和从 1 到 5 个服务器(s)托管 SharePoint 订阅/2019 / 2016 场,其中包含大量配置,包括受信任的身份验证、具有个人网站的用户配置文件、OAuth 信任(使用证书)、用于托管高信任外接程序的专用 IIS 站点,等等。已安装最新版本的密钥软件(包括 Fiddler、vscode、np++、7zip、ULS 查看器)。 SharePoint 计算机具有其他微调功能,使它们立即可用(远程管理工具、Edge 和 Chrome 的自定义策略、快捷方式等)。
使用 Azure 防火墙作为中心 & 辐射型拓扑中的 DNS 代理

部署到 Azure
此示例演示如何使用 Azure 防火墙在 Azure 中部署中心辐射型拓扑。 中心虚拟网络充当通过虚拟网络对等互连连接到中心虚拟网络的许多辐射虚拟网络的中心点。
使用规则和 Ipgroups 创建防火墙和 FirewallPolicy

部署到 Azure
此模板部署包含防火墙策略(包括多个应用程序和网络规则)的 Azure 防火墙,该防火墙引用了应用程序和网络规则中的 IP 组。
使用显式代理创建防火墙、FirewallPolicy

部署到 Azure
此模板使用 IpGroups 的显式代理和网络规则创建 Azure 防火墙、FirewalllPolicy。 此外,还包括 Linux Jumpbox vm 设置
使用 FirewallPolicy 和 IpGroups 创建防火墙

部署到 Azure
此模板创建一个包含 FirewalllPolicy 的 Azure 防火墙,该防火墙引用了 IpGroups 的网络规则。 此外,还包括 Linux Jumpbox vm 设置
Azure 防火墙高级版 的 测试环境

部署到 Azure
此模板创建具有高级功能(例如入侵检查检测(IDPS)、TLS 检查和 Web 类别筛选等高级功能的 Azure 防火墙高级和防火墙策略
使用防火墙策略 创建沙盒设置

部署到 Azure
此模板创建包含 3 个子网(服务器子网、jumpbox 子集和 AzureFirewall 子网)的虚拟网络、具有公共 IP 的 jumpbox VM、服务器 VM、UDR 路由,以指向服务器子网的 Azure 防火墙以及具有 1 个或多个公共 IP 地址的 Azure 防火墙。 此外,还创建包含 1 个示例应用程序规则、1 个示例网络规则和默认专用范围的防火墙策略
安全虚拟中心

部署到 Azure
此模板使用 Azure 防火墙创建安全的虚拟中心,以保护发往 Internet 的云网络流量。

Terraform (AzAPI 提供程序)资源定义

可以使用目标操作部署 firewallPolicies 资源类型:

  • 资源组

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.Network/firewallPolicies 资源,请将以下 Terraform 添加到模板。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Network/firewallPolicies@2023-06-01"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  identity {
    type = "string"
    identity_ids = []
  }
  body = jsonencode({
    properties = {
      basePolicy = {
        id = "string"
      }
      dnsSettings = {
        enableProxy = bool
        requireProxyForNetworkRules = bool
        servers = [
          "string"
        ]
      }
      explicitProxy = {
        enableExplicitProxy = bool
        enablePacFile = bool
        httpPort = int
        httpsPort = int
        pacFile = "string"
        pacFilePort = int
      }
      insights = {
        isEnabled = bool
        logAnalyticsResources = {
          defaultWorkspaceId = {
            id = "string"
          }
          workspaces = [
            {
              region = "string"
              workspaceId = {
                id = "string"
              }
            }
          ]
        }
        retentionDays = int
      }
      intrusionDetection = {
        configuration = {
          bypassTrafficSettings = [
            {
              description = "string"
              destinationAddresses = [
                "string"
              ]
              destinationIpGroups = [
                "string"
              ]
              destinationPorts = [
                "string"
              ]
              name = "string"
              protocol = "string"
              sourceAddresses = [
                "string"
              ]
              sourceIpGroups = [
                "string"
              ]
            }
          ]
          privateRanges = [
            "string"
          ]
          signatureOverrides = [
            {
              id = "string"
              mode = "string"
            }
          ]
        }
        mode = "string"
        profile = "string"
      }
      sku = {
        tier = "string"
      }
      snat = {
        autoLearnPrivateRanges = "string"
        privateRanges = [
          "string"
        ]
      }
      sql = {
        allowSqlRedirect = bool
      }
      threatIntelMode = "string"
      threatIntelWhitelist = {
        fqdns = [
          "string"
        ]
        ipAddresses = [
          "string"
        ]
      }
      transportSecurity = {
        certificateAuthority = {
          keyVaultSecretId = "string"
          name = "string"
        }
      }
    }
  })
}

属性值

firewallPolicies

名字 描述 价值
类型 资源类型 “Microsoft.Network/firewallPolicies@2023-06-01”
名字 资源名称 string (必需)

字符限制:1-80

有效字符:
字母数字、下划线、句点和连字符。

从字母数字开始。 结束字母数字或下划线。
位置 资源位置。 字符串
parent_id 若要部署到资源组,请使用该资源组的 ID。 string (必需)
标签 资源标记。 标记名称和值的字典。
身份 防火墙策略的标识。 ManagedServiceIdentity
性能 防火墙策略的属性。 FirewallPolicyPropertiesFormat

ManagedServiceIdentity

名字 描述 价值
类型 用于资源的标识类型。 类型“SystemAssigned,UserAssigned”包括隐式创建的标识和一组用户分配的标识。 类型“None”将从虚拟机中删除任何标识。 “SystemAssigned”
“SystemAssigned, UserAssigned”
“UserAssigned”
identity_ids 与资源关联的用户标识列表。 用户标识字典密钥引用的格式为 ARM 资源 ID:“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。 用户标识 ID 的数组。

ManagedServiceIdentityUserAssignedIdentities

名字 描述 价值
{自定义属性} Components1Jq1T4ISchemasManagedserviceidentityProper...

Components1Jq1T4ISchemasManagedserviceidentityProper...

此对象不包含在部署期间设置的任何属性。 所有属性都是 ReadOnly。

FirewallPolicyPropertiesFormat

名字 描述 价值
basePolicy 继承规则的父防火墙策略。 SubResource
dnsSettings DNS 代理设置定义。 DnsSettings
explicitProxy 显式代理设置定义。 ExplicitProxy
见解 有关防火墙策略的见解。 FirewallPolicyInsights
intrusionDetection 入侵检测的配置。 FirewallPolicyIntrusionDetection
sku 防火墙策略 SKU。 FirewallPolicySku
snat 流量不会为 SNAT 的专用 IP 地址/IP 范围。 FirewallPolicySnat
sql SQL 设置定义。 FirewallPolicySQL
threatIntelMode 威胁智能的操作模式。 “警报”
“拒绝”
“关闭”
threatIntelWhitelist Firewall Policy 的 ThreatIntel Allowlist。 FirewallPolicyThreatIntelWhitelist
transportSecurity TLS 配置定义。 FirewallPolicyTransportSecurity

SubResource

名字 描述 价值
id 资源 ID。 字符串

DnsSettings

名字 描述 价值
enableProxy 在附加到防火墙策略的防火墙上启用 DNS 代理。 bool
requireProxyForNetworkRules 当设置为 true 时,支持网络规则中的 FQDN。 bool
服务器 自定义 DNS 服务器列表。 string[]

ExplicitProxy

名字 描述 价值
enableExplicitProxy 设置为 true 时,将启用显式代理模式。 bool
enablePacFile 如果设置为 true,则需要提供 pac 文件端口和 URL。 bool
httpPort 显式代理 http 协议的端口号不能大于 64000。 int

约束:
最小值 = 0
最大值 = 64000
httpsPort 显式代理 https 协议的端口号不能大于 64000。 int

约束:
最小值 = 0
最大值 = 64000
pacFile PAC 文件的 SAS URL。 字符串
pacFilePort 要为 PAC 文件提供服务的防火墙的端口号。 int

约束:
最小值 = 0
最大值 = 64000

FirewallPolicyInsights

名字 描述 价值
isEnabled 一个标志,用于指示是否对策略启用了见解。 bool
logAnalyticsResources 配置防火墙策略见解所需的工作区。 FirewallPolicyLogAnalyticsResources
retentionDays 应在策略上启用见解的天数。 int

FirewallPolicyLogAnalyticsResources

名字 描述 价值
defaultWorkspaceId 防火墙策略见解的默认工作区 ID。 SubResource
workspaces 防火墙策略见解的工作区列表。 FirewallPolicyLogAnalyticsWorkspace[]

FirewallPolicyLogAnalyticsWorkspace

名字 描述 价值
地区 要配置工作区的区域。 字符串
workspaceId 防火墙策略见解的工作区 ID。 SubResource

FirewallPolicyIntrusionDetection

名字 描述 价值
配置 入侵检测配置属性。 FirewallPolicyIntrusionDetectionConfiguration
模式 入侵检测常规状态。 附加到父策略时,防火墙的有效 IDPS 模式是两者更严格的模式。 “警报”
“拒绝”
“关闭”
轮廓 IDPS 配置文件名称。 附加到父策略时,防火墙的有效配置文件是父策略的配置文件名称。 “高级”
“Basic”
“Extended”
“Standard”

FirewallPolicyIntrusionDetectionConfiguration

名字 描述 价值
bypassTrafficSettings 要绕过的流量的规则列表。 FirewallPolicyIntrusionDetectionBypassTrafficSpecifi...[]
privateRanges IDPS 专用 IP 地址范围用于标识流量方向(例如入站、出站等)。 默认情况下,仅 IANA RFC 1918 定义的范围被视为专用 IP 地址。 若要修改默认范围,请使用此属性指定专用 IP 地址范围 string[]
signatureOverrides 特定签名状态的列表。 FirewallPolicyIntrusionDetectionSignatureSpecificati...[]

FirewallPolicyIntrusionDetectionBypassTrafficSpecifi...

名字 描述 价值
描述 绕过流量规则的说明。 字符串
destinationAddresses 此规则的目标 IP 地址或范围列表。 string[]
destinationIpGroups 此规则的目标 IpGroup 列表。 string[]
destinationPorts 目标端口或范围的列表。 string[]
名字 绕过流量规则的名称。 字符串
协议 规则绕过协议。 “ANY”
“ICMP”
“TCP”
“UDP”
sourceAddresses 此规则的源 IP 地址或范围列表。 string[]
sourceIpGroups 此规则的源 IpGroup 列表。 string[]

FirewallPolicyIntrusionDetectionSignatureSpecificati...

名字 描述 价值
id 签名 ID。 字符串
模式 签名状态。 “警报”
“拒绝”
“关闭”

FirewallPolicySku

名字 描述 价值
防火墙策略的层。 “Basic”
“Premium”
“Standard”

FirewallPolicySnat

名字 描述 价值
autoLearnPrivateRanges 用于自动学习专用范围的操作模式不是 SNAT “Disabled”
“已启用”
privateRanges 非 SNAT 的专用 IP 地址/IP 地址范围列表。 string[]

FirewallPolicySQL

名字 描述 价值
allowSqlRedirect 指示是否启用了 SQL 重定向流量筛选的标志。 启用标志不需要使用端口 11000-11999 的规则。 bool

FirewallPolicyThreatIntelWhitelist

名字 描述 价值
fqdns ThreatIntel Allowlist 的 FQDN 列表。 string[]
ipAddresses ThreatIntel Allowlist 的 IP 地址列表。 string[]

FirewallPolicyTransportSecurity

名字 描述 价值
certificateAuthority 用于中间 CA 生成的 CA。 FirewallPolicyCertificateAuthority

FirewallPolicyCertificateAuthority

名字 描述 价值
keyVaultSecretId 存储在 KeyVault 中的“Secret”或“Certificate”对象的机密 ID(base-64 编码的未加密 pfx)。 字符串
名字 CA 证书的名称。 字符串