Reputation: 59
I am trying to add VNET integration to my function app, but it does not seem to work.
Is this feature not supported? The release works, but the VNET integration does not.
I have looked at a few examples online and done exactly as presented but no luck. This does however work an a Web App.
Seems strange for something like this to not work.
{
"apiVersion": "2019-08-01",
"type": "Microsoft.Web/sites",
"name": "[parameters('casehandler-function-app-name')]",
"location": "[resourceGroup().location]",
"kind": "functionapp",
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', parameters('app-service-plan-name'))]",
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storage-account-name'))]",
"microsoft.insights/components/appi-casehandler-pilot"
],
"properties": {
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('app-service-plan-name'))]",
"siteConfig": {
"appSettings": [
{"name": "FUNCTIONS_EXTENSION_VERSION","value": "[parameters('FUNCTIONS_EXTENSION_VERSION')]"},
{"name": "FUNCTIONS_WORKER_RUNTIME","value": "[parameters('FUNCTIONS_WORKER_RUNTIME')]"},
{"name": "WEBSITE_ENABLE_SYNC_UPDATE_SITE","value": "[parameters('WEBSITE_ENABLE_SYNC_UPDATE_SITE')]"},
{"name": "WEBSITE_RUN_FROM_PACKAGE","value": "[parameters('WEBSITE_RUN_FROM_PACKAGE')]"},
{"name": "APPINSIGHTS_INSTRUMENTATIONKEY","value": "[reference('microsoft.insights/components/appi-casehandler-pilot', '2015-05-01').InstrumentationKey]"},
{"name": "APPLICATIONINSIGHTS_CONNECTION_STRING","value": "[reference('microsoft.insights/components/appi-casehandler-pilot', '2015-05-01').ConnectionString]"},
{"name": "AzureWebJobsStorage","value": "[concat('DefaultEndpointsProtocol=https;AccountName=',parameters('storage-account-name'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('storage-account-name')), '2019-06-01').keys[0].value,';EndpointSuffix=','core.windows.net')]"}
]
},
"resources": [
{
"type": "config",
"name": "virtualNetwork",
"apiVersion": "2018-11-01",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Web/sites/', parameters('casehandler-function-app-name'))]"
],
"properties": {
"subnetResourceId": "[concat(parameters('vnetResourceId'), '/subnets/', parameters('snetName'))]",
"swiftSupported": true
}
}
],
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', parameters('app-service-plan-name'))]"
]
}
},
Upvotes: 0
Views: 134
Reputation: 40849
You need Microsoft.Web sites/virtualNetworkConnections
{
"name": "string",
"type": "Microsoft.Web/sites/virtualNetworkConnections",
"apiVersion": "2018-02-01",
"kind": "string",
"properties": {
"vnetResourceId": "string",
"certBlob": "string",
"dnsServers": "string",
"isSwift": "boolean"
},
"resources": []
}
Which is missing on your template.
Upvotes: 0