From 2f7055d636a731bcbe00f48b49a59bd4de711eaf Mon Sep 17 00:00:00 2001 From: Nathan Bowes Date: Fri, 22 Jan 2021 11:46:59 +0000 Subject: [PATCH] Setup App Insights for finance worker in ARM --- azure/finance.template.json | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/azure/finance.template.json b/azure/finance.template.json index be5e04c6b5..5bc0c697f3 100644 --- a/azure/finance.template.json +++ b/azure/finance.template.json @@ -69,11 +69,10 @@ }, "sharedApimName": { "type": "string" - }, + }, "appServiceAllowedIPs": { "type": "array", - "defaultValue": [ - ] + "defaultValue": [] }, "sharedEnvVirtualNetworkName": { "type": "string" @@ -110,8 +109,7 @@ "type": "Microsoft.Resources/resourceGroups", "location": "[parameters('resourceGroupLocation')]", "tags": "[parameters('tags')]", - "properties": { - } + "properties": {} }, { "apiVersion": "2020-06-01", @@ -155,6 +153,27 @@ } } }, + { + "apiVersion": "2020-06-01", + "name": "WorkerAppInsights", + "type": "Microsoft.Resources/deployments", + "resourceGroup": "[variables('resourceGroupName')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(variables('deploymentUrlBase'),'application-insights.json')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "appInsightsName": { + "value": "[variables('workerAppServiceName')]" + }, + "attachedService": { + "value": "[variables('workerAppServiceName')]" + } + } + } + }, { "condition": "[greater(length(parameters('uiCustomHostName')), 0)]", "apiVersion": "2020-06-01", @@ -444,6 +463,10 @@ { "name": "StorageConnectionString", "value": "[parameters('storageConnectionString')]" + }, + { + "name": "InstrumentationKey", + "value": "[reference('WorkerAppInsights').outputs.InstrumentationKey.value]" } ] } @@ -544,4 +567,4 @@ "value": "[variables('workerAppServiceName')]" } } -} \ No newline at end of file +}