graphrag-accelerator/infra/core/monitor/app-insights.bicep

32 lines
1.1 KiB
Bicep
Raw Normal View History

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
@description('Application Insights resource name')
param appInsightsName string = 'appi'
@description('Azure region where the resources will be deployed')
param location string = resourceGroup().location
@description('Application Insights public network access for ingestion')
param appInsightsPublicNetworkAccessForIngestion string = 'Disabled'
@description('Workspace id of a Log Analytics resource.')
param logAnalyticsWorkspaceId string
resource appInsights 'Microsoft.Insights/components@2020-02-02' = {
name: appInsightsName
location: location
kind: 'web'
properties: {
Application_Type: 'web'
WorkspaceResourceId: logAnalyticsWorkspaceId
publicNetworkAccessForIngestion: appInsightsPublicNetworkAccessForIngestion
publicNetworkAccessForQuery: 'Enabled'
}
}
output name string = appInsights.name
output id string = appInsights.id
output connectionString string = appInsights.properties.ConnectionString
output instrumentationKey string = appInsights.properties.InstrumentationKey