Skip to content

Instantly share code, notes, and snippets.

@dylanmorley
Created August 9, 2021 20:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dylanmorley/21975d7959a688db0f11c627dd76d1d4 to your computer and use it in GitHub Desktop.
Save dylanmorley/21975d7959a688db0f11c627dd76d1d4 to your computer and use it in GitHub Desktop.
Logic App Standard ARM template with VNET support
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"logic_app_name": {
"type": "String"
},
"logic_app_plan_id": {
"type": "String"
},
"storage_account_connection_string": {
"type": "String"
},
"region_name": {
"type": "String"
},
"share_name": {
"type": "String"
},
"instrumentation_key": {
"type": "String"
},
"use_vnet": {
"type": "String"
}
},
"variables": {},
"resources": [
{
"apiVersion": "2018-11-01",
"name": "[parameters('logic_app_name')]",
"type": "Microsoft.Web/sites",
"kind": "functionapp,workflowapp",
"location": "[parameters('region_name')]",
"dependsOn": [],
"properties": {
"name": "[parameters('logic_app_name')]",
"siteConfig": {
"appSettings": [
{
"name": "FUNCTIONS_EXTENSION_VERSION",
"value": "~3"
},
{
"name": "FUNCTIONS_WORKER_RUNTIME",
"value": "node"
},
{
"name": "WEBSITE_NODE_DEFAULT_VERSION",
"value": "~12"
},
{
"name": "AzureWebJobsStorage",
"value": "[parameters('storage_account_connection_string')]"
},
{
"name": "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING",
"value": "[parameters('storage_account_connection_string')]"
},
{
"name": "WEBSITE_CONTENTSHARE",
"value": "[parameters('share_name')]"
},
{
"name": "APP_KIND",
"value": "workflowApp"
},
{
"name": "FUNCTIONS_V2_COMPATIBILITY_MODE",
"value": "true"
},
{
"name": "APPLICATIONINSIGHTS_CONNECTION_STRING",
"value": "[concat('InstrumentationKey=', parameters('instrumentation_key'), ';IngestionEndpoint=https://', tolower(replace(parameters('region_name'),' ', '')), '-2.in.applicationinsights.azure.com/')]"
},
{
"name": "APPINSIGHTS_INSTRUMENTATIONKEY",
"value": "[parameters('instrumentation_key')]"
},
{
"name": "WEBSITE_CONTENTOVERVNET",
"value": "[parameters('use_vnet')]"
},
{
"name": "WEBSITE_VNET_ROUTE_ALL",
"value": "[parameters('use_vnet')]"
},
{
"name": "WEBSITE_ENABLE_SYNC_UPDATE_SITE",
"value": "true"
}
],
"use32BitWorkerProcess": false,
"cors": {
"allowedOrigins": [
"https://afd.hosting.portal.azure.net",
"https://afd.hosting-ms.portal.azure.net",
"https://hosting.portal.azure.net",
"https://ms.hosting.portal.azure.net",
"https://ema-ms.hosting.portal.azure.net",
"https://ema.hosting.portal.azure.net"
]
}
},
"serverFarmId": "[parameters('logic_app_plan_id')]",
"clientAffinityEnabled": false,
"httpsOnly": true
},
"identity": {
"type": "SystemAssigned"
}
}
],
"outputs": {
"resourceId": {
"type": "String",
"value": "[resourceId('Microsoft.Web/sites', parameters('logic_app_name'))]"
},
"identity_id": {
"type": "String",
"value": "[reference(resourceId('Microsoft.Web/sites', parameters('logic_app_name')), '2019-08-01', 'full').identity.principalId]"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment