From e2c2f87348a107980909c14bb1bd042fe348438c Mon Sep 17 00:00:00 2001 From: stas Date: Mon, 27 Sep 2021 13:54:22 -0700 Subject: [PATCH] =?UTF-8?q?Deployment=20fails=20in=20westus3=20due=20to=20?= =?UTF-8?q?"Region=20doesn=E2=80=99t=20support=20Classic=20resource=20mode?= =?UTF-8?q?=20for=20Application=20Insights=20resources."=20#1273?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/deployment/azuredeploy.json | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/deployment/azuredeploy.json b/src/deployment/azuredeploy.json index 5b461511c8..74d10d8675 100644 --- a/src/deployment/azuredeploy.json +++ b/src/deployment/azuredeploy.json @@ -388,8 +388,17 @@ "OWNER": "[parameters('owner')]" } }, + { - "apiVersion": "2015-05-01", + "type": "Microsoft.OperationalInsights/workspaces", + "apiVersion": "2020-08-01", + "name": "[parameters('name')]", + "location": "[resourceGroup().location]", + "properties": {} + }, + + { + "apiVersion": "2020-02-02-preview", "name": "[parameters('name')]", "type": "microsoft.insights/components", "location": "[resourceGroup().location]", @@ -397,11 +406,15 @@ "properties": { "ApplicationId": "[parameters('name')]", "Application_Type": "other", - "RetentionInDays": "[variables('log_retention')]" + "RetentionInDays": "[variables('log_retention')]", + "WorkspaceResourceId" : "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('name'))]" }, "tags": { "OWNER": "[parameters('owner')]" }, + "dependsOn" : [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('name'))]" + ], "resources": [ { "name": "df20765c-ed5b-46f9-a47b-20f4aaf7936d",