Limiting IP Addresses on Azure WebApp from ARM (Azure Resource Manager)

I use ARM templates for deployment in Azure web applications, the site is deployed in several environments, and the ARM template takes different parameters for each of them.

One of the requirements is the inclusion of an IP block on the site in some environments, but not in others. This can be done through web.config, but it is not ideal, since I manage all the settings of the application through ARM and do the web deployment of the zip site. Adding transformations for each environment will be painful and require significant rework.

I would like to specify something like this in my template file:

   {
      "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'))]"
      ]
    }

"Microsoft/Web" resources.azure.com , , "config/web" "ipSecurityRestrictions".

ARMView

ARM Explorer , . .netSDK ( ).

resources.azure.com, , .

- , ?

+7
2

IP-, - https://resources.azure.com/

:

"ipSecurityRestrictions": [
  {
    "ipAddress": "12.23.254.3",
    "subnetMask": "255.255.0.0"
  }
]
+9

siteConfig ipSecurityRestrictions :

{
    "apiVersion": "2015-06-01",
    "name": "[parameters('siteName')]",
    "type": "Microsoft.Web/Sites",
    ...
    "properties":{
        "siteConfig":{
            "ipSecurityRestrictions" : {
                 "ipAddress": "123.123.123.123"
            }
        }
    },
    "resources" : {
        ...
    }
}
+2

All Articles