Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save neerajks77/eed7ba1878200b237f9889410fe91a48 to your computer and use it in GitHub Desktop.
Save neerajks77/eed7ba1878200b237f9889410fe91a48 to your computer and use it in GitHub Desktop.
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