首页 > 解决方案 > 如何在使用 ARM 模板创建时为 Azure Key Vault 设置“选定网络”

问题描述

我想将防火墙状态设置为“选定网络”——在我创建 Azure Key Vault 服务时基本上拒绝所有数据包。(我有另一个自动化来设置商定的防火墙规则)。

我正在部署 ARM 模板并使用以下属性:

"networkAcls": {
          "value": {
            "defaultAction": "Deny",
            "bypass": "AzureServices"
          }
        }

但是,这是行不通的。

当前结果:

在此处输入图像描述

这就是我要的:

在此处输入图像描述

标签: azureazure-resource-managerazure-keyvaultarm-template

解决方案


Here is the template i tried for Network ACL which worked for me, I have not added Value node in the template.

"networkAcls": {
      "bypass": "string",
      "defaultAction": "string",
      "ipRules": [
        {
          "value": "string"
        }
      ],
      "virtualNetworkRules": [
        {
          "id": "string"
        }
      ]
    }
  }

Reference: https://docs.microsoft.com/en-us/azure/templates/microsoft.keyvault/2018-02-14/vaults

try and see if it works for you.


推荐阅读