Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
IP Security ARM Template
{
"apiVersion": "2015-08-01",
"name": "[variables('webSiteName')]",
"type": "Microsoft.Web/sites",
"location": "[resourceGroup().location]",
"tags": {
"[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]":"Resource",
"displayName": "Website"
},
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]"
],
"properties": {
"name": "[variables('webSiteName')]",
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('hostingPlanName'))]"
},
"resources": [
{
"name": "web",
"type": "config",
"apiVersion": "2015-08-01",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', variables('webSiteName'))]"
],
"tags": {
"displayName": "web"
},
"properties": {
"ipSecurityRestrictions": [
{
"ipAddress": "[parameters('allowedIPAddress')]", //Only allow this ip, block all others
"subnetMask": "255.255.255.255"
}
]
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment