Skip to content

Commit 3fb1088

Browse files
committed
feat: log analytics migration
1 parent c6913bd commit 3fb1088

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

infra/main.bicep

+9-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ param location string = resourceGroup().location
2727
var containerRegistryPasswordRef = 'container-registry-password'
2828
var mailgunApiKeyRef = 'mailgun-api-key'
2929

30-
resource workspace 'Microsoft.OperationalInsights/workspaces@2021-12-01-preview' = {
30+
// https://learn.microsoft.com/en-us/azure/templates/microsoft.operationalinsights/workspaces?pivots=deployment-language-bicep
31+
resource workspace 'Microsoft.OperationalInsights/workspaces@2023-09-01' = {
3132
name: workspaceName
3233
location: location
3334
tags: tags
@@ -40,14 +41,19 @@ resource workspace 'Microsoft.OperationalInsights/workspaces@2021-12-01-preview'
4041
}
4142
}
4243

44+
// https://learn.microsoft.com/en-us/azure/templates/microsoft.insights/components?pivots=deployment-language-bicep
4345
resource appInsights 'Microsoft.Insights/components@2020-02-02' = {
4446
name: appInsightsName
4547
location: location
46-
tags: tags
47-
kind: 'web'
48+
kind: 'other'
4849
properties: {
4950
Application_Type: 'web'
5051
Flow_Type: 'Bluefield'
52+
WorkspaceResourceId: workspace.id
53+
RetentionInDays: 90
54+
IngestionMode: 'LogAnalytics'
55+
publicNetworkAccessForIngestion: 'Enabled'
56+
publicNetworkAccessForQuery: 'Enabled'
5157
}
5258
}
5359

0 commit comments

Comments
 (0)