Are there any way to disconnect an App Service from a subnet in a virtual network using arm templates?
I am integrating App Service with a subnet in a virtual network using an armtemplate.
In some rare cases I need to be able to disconnect the App Service from the subnet again also using arm templates, however, I have not been able to find support to achieve this. Have I missed an obvious solution to achieve this, or is it not possible?
The arm template is deployed incrementally. Using Powershell or Azure CLI are unfortunately not an option in my case.
I am using the below arm template (snippet) to integrate the App Service in the subnet (see attached doc for full example: 41472-deployverify-managednatjson.txt).
{
"name": "[variables('webAppName')]",
"type": "Microsoft.Web/sites",
"apiVersion": "2018-11-01",
"location": "[variables('location')]",
"tags": {
},
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', variables('appServicePlanName'))]",
"[resourceId('Microsoft.Network/virtualNetworks', variables('vNetName'))]"
],
"properties": {
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('appServicePlanName'))]",
"siteConfig": {
"http20Enabled": true,
"minTlsVersion": "1.2",
"vnetRouteAllEnabled": true
},
"httpsOnly": false
},
"resources": [
{
"name": "virtualNetwork",
"type": "networkConfig",
"apiVersion": "2018-11-01",
"location": "[variables('location')]",
"properties": {
"subnetResourceid": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vnetName'), 'outbound')]",
"swiftSupported": true
},
"dependsOn": [
"[resourceId('Microsoft.Web/sites', variables('webAppName'))]"
]
}
]
}
Thanks, Mads