title: Add virtualNetworkRules in ARM template for Azure KeyVault
body: <p>I would like to add virtualNetworkRules in ARM Template. But unfortunately it is not able to get the parameter and activate the Firewall and Virtual Networks settings. </p>
  
  <p>I create an ARM template using the Script below:
  <a href="https://docs.microsoft.com/en-us/azure/templates/microsoft.keyvault/2018-02-14/vaults#IPRule" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/templates/microsoft.keyvault/2018-02-14/vaults#IPRule</a></p>
  
  <pre><code>    {
        "type": "Microsoft.KeyVault/vaults",
        "name": "[parameters('keyVaultName')]",
        "apiVersion": "2018-02-14",
        "location": "[parameters('location')]",
        "properties": {
          "firewallState": "Enabled",
          "enabledForDeployment": "[parameters('enabledForDeployment')]",
          "enabledForDiskEncryption": "[parameters('enabledForDiskEncryption')]",
          "enabledForTemplateDeployment": "[parameters('enabledForTemplateDeployment')]",
          "tenantId": "[parameters('tenantId')]",
          "accessPolicies": [
            {
              "objectId": "[parameters('objectId')]",
              "tenantId": "[parameters('tenantId')]",
              "permissions": {
                "keys": "[parameters('keysPermissions')]",
                "secrets": "[parameters('secretsPermissions')]"
              }
            }
          ],
          "sku": {
            "name": "[parameters('skuName')]",
            "family": "A"
          },
          "networkAcls": {
            "bypass": "AzureServices",
            "ipRules": [
              {
                "value": "xxxx"
              }
            ],
            "virtualNetworkRules": [
              {
                  "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('vnetName'), parameters('subnet1Name'))]"
              }
            ]
          }
        }
      }
    ]
  </code></pre>
  
  <p>The networkAcls part in ARM Script is not working at all. It does not activate the Firewall and Virtual Networks settings.</p>