forked from github/awesome-copilot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathappinsights.bicep
More file actions
30 lines (26 loc) · 759 Bytes
/
Copy pathappinsights.bicep
File metadata and controls
30 lines (26 loc) · 759 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
@description('Location for all resources')
param location string = resourceGroup().location
@description('Name for new Application Insights')
param name string
// Create Log Analytics Workspace
resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2022-10-01' = {
name: '${name}-workspace'
location: location
properties: {
sku: {
name: 'PerGB2018'
}
retentionInDays: 30
}
}
// Create Application Insights
resource applicationInsights 'Microsoft.Insights/components@2020-02-02' = {
name: name
location: location
kind: 'web'
properties: {
Application_Type: 'web'
WorkspaceResourceId: logAnalyticsWorkspace.id
}
}
output connectionString string = applicationInsights.properties.ConnectionString