title: IP Restriction on Azure WebApp from ARM (Azure Resource Manager)
body: <p>I'm using ARM templates to deploy to Azure Web Apps, the site is deployed to a number of environments, with the ARM Template accepting different parameters for each. </p>
  
  <p>One of the requirements is to enable an IP block on the site in some environments but not others. This can be done through web.config but this isn't ideal as I manager all app settings through ARM and do a webdeploy of zipped site. Adding transforms for each environment would be a pain and require significant rework. </p>
  
  <p>I'd like to specify something like this in my our template file:</p>
  
  <pre><code>   {
        "type": "config",
        "apiVersion": "2015-08-01",
        "name": "web",
        "properties": {
          "ipSecurityRestrictions": {
            "allowUnlisted": false,
            "ipAddresses": [ "127.0.0.1", "127.0.0.2" ]
          }
        },
        "dependsOn": [
          "[concat('Microsoft.Web/sites/', parameters('nameofwebapp'))]"
        ]
      }
  </code></pre>
  
  <p>Browsing the resource provider for "Microsoft/Web" with resources.azure.com it appears that this might be possible as there is a "ipSecurityRestrictions" property on "config/web". </p>
  
  <p><a href="http://i.stack.imgur.com/OT4JA.png" rel="noreferrer">ARMView</a></p>
  
  <p>The ARM Explorer code shows it <a href="https://github.com/projectkudu/ARMExplorer/blob/9f369c26c5fe4e045bab34004c470e16556b0d58/App_Data/JsonSpecs/Microsoft.Web.json#L3436" rel="noreferrer">here</a> and hints as it's usage. I can also find a past usage of it in the .netSDK here (Run out of allowed links). </p>
  
  <p>When I attempt to set this using resources.azure.com I get no feedback and it returns to be null. </p>
  
  <p>Can anyone help with details on how I can use this property?</p>