Skip to content

Instantly share code, notes, and snippets.

@rcabr
Created August 9, 2019 19:21
Show Gist options
  • Save rcabr/f380ac55095204e89c32ec2ace05becb to your computer and use it in GitHub Desktop.
Save rcabr/f380ac55095204e89c32ec2ace05becb to your computer and use it in GitHub Desktop.
Deploy IP restrictions to a Web App with name 'name'
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"name": {
"type": "string"
}
},
"resources": [
{
"name": "[concat(parameters('name'), '/web')]",
"type": "Microsoft.Web/sites/config",
"apiVersion": "2018-11-01",
"properties": {
"scmIpSecurityRestrictionsUseMain": true,
"ipSecurityRestrictions": [
{
"ipAddress": "[CIDR address]",
"action": "Allow",
"priority": 3000,
"name": "My HideNAT"
},
{
"ipAddress": "[CIDR address]",
"action": "Allow",
"priority": 3001,
"name": "My other HideNAT"
}
]
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment