Skip to content

Instantly share code, notes, and snippets.

@cmatskas
Last active January 15, 2021 04:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cmatskas/c693424e1cb25b9798643e6ffc6a7fd4 to your computer and use it in GitHub Desktop.
Save cmatskas/c693424e1cb25b9798643e6ffc6a7fd4 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