2025-01-30 13:59:51 -05:00
|
|
|
// 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'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2025-03-10 19:41:28 -04:00
|
|
|
output name string = appInsights.name
|
2025-01-30 13:59:51 -05:00
|
|
|
output id string = appInsights.id
|
|
|
|
output connectionString string = appInsights.properties.ConnectionString
|
|
|
|
output instrumentationKey string = appInsights.properties.InstrumentationKey
|