29 lines
813 B
Bicep
Raw Permalink Normal View History

2024-06-26 15:45:06 -04:00
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
@description('The name of the Log Analytics resource.')
param name string
@description('The location of the Log Analytics resource.')
param location string = resourceGroup().location
2024-07-15 16:42:22 -07:00
@description('The public network access for ingestion.')
param publicNetworkAccessForIngestion string = 'Disabled'
2024-06-26 15:45:06 -04:00
resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2022-10-01' = {
name: name
location: location
properties: {
retentionInDays: 30
2024-07-15 16:42:22 -07:00
publicNetworkAccessForIngestion: publicNetworkAccessForIngestion
2024-06-26 15:45:06 -04:00
publicNetworkAccessForQuery: 'Enabled'
features: {
immediatePurgeDataOn30Days: true
}
}
}
output name string = logAnalyticsWorkspace.name
output id string = logAnalyticsWorkspace.id