mirror of
https://github.com/github/awesome-copilot.git
synced 2026-02-20 02:15:12 +00:00
31 lines
759 B
Bicep
31 lines
759 B
Bicep
@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
|