Bicep Module Documentation

← Back to Overview

Module log-analytics-workspace

logAnalyticsWorkspace

Property Value Description
general (required) general
identity identity
defaultDataCollectionRuleResourceId string The resource ID of the default Data Collection Rule to use for this workspace. Expected format is - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dcrName}.
features features Workspace features.
forceCmkForQuery bool Indicates whether customer managed storage is mandatory for query management.
publicNetworkAccessForIngestion 'Disabled'
'Enabled'
The network access type for accessing Log Analytics ingestion. (default: enabled)
publicNetworkAccessForQuery 'Disabled'
'Enabled'
The network access type for accessing Log Analytics query.(default: enabled)
retentionInDays int The workspace data retention in days. Allowed values are per pricing plan. See pricing tiers documentation for details. (default: 90)
sku sku The SKU of the workspace.
dailyQuotaGb int The daily volume cap for ingestion.
linkedResourceId string The resource id of the resource that will be linked to the workspace. This should be used for linking resources which require READ access

identity

Property Value Description
type 'None'
'SystemAssigned'
'UserAssigned'
The types of identities associated with this resource. (default: none)
userAssignedIdentities string[] Resource IDs of User Assigned Identities to associate with this resource

features

Property Value Description
clusterResourceId string Dedicated LA cluster resourceId that is linked to the workspaces.
disableLocalAuth bool Disable Non-AAD based Auth.
enableDataExport bool Flag that indicate if data should be exported.
enableLogAccessUsingOnlyResourcePermissions bool Flag that indicate which permission to use - resource or workspace or both.
immediatePurgeDataOn30Days bool Flag that describes if we want to remove the data after 30 days.

sku

Property Value Description
capacityReservationLevel int The capacity reservation level in GB for this workspace, when CapacityReservation sku is selected.
name (required) 'CapacityReservation'
'Free'
'LACluster'
'PerGB2018'
'PerNode'
'Premium'
'Standalone'
'Standard'
The name of the SKU. (default: PerGB2018)

naming

Property Value Description
forceFunctionAsFullName bool Use the function value as the full name of the resource
abbreviation string Override the abbreviation of this resource with this parameter
environment string The resource environment (for example: dev, tst, acc, prd)
location string The resource location (for example: weu, we, westeurope)
customer string The name of the customer
delimiter string The delimiter between resources (default: -)
nameFormat Array containing any of:
'abbreviation'
'customer'
'environment'
'function'
'location'
'param1'
'param2'
'param3'
'useCaseName'
The order of the array defines the order of elements in the naming scheme
param1 string Extra parameter self defined
param2 string Extra parameter self defined
param3 string Extra parameter self defined
function (required) string Function of the resource [can be app, db, security,...]
useCaseName string Name of the use case [can be hub, spoke,...]
suffix string Suffix for the resource, if empty non will be appended, otherwise will be added to the end [can be index, ...]
forceDefaultNaming bool Force the CAF naming instead of default company naming

resourceLock

Property Value Description
name string Character limit: 1-90. Valid characters: Alphanumerics, periods, underscores, hyphens, and parenthesis. Can't end in period.
level (required) 'CanNotDelete'
'ReadOnly'
The level of the lock. Possible values are: CanNotDelete and ReadOnly. CanNotDelete means authorized users are able to read and modify the resources, but not delete. ReadOnly means authorized users can only read from a resource, but they can't modify or delete it. Read-Only locks must be commented to be able to deploy again
notes string Notes about the lock. Maximum of 512 characters.
owners resourceLockOwner[] The owners of the lock

resourceLockOwner

Property Value Description
applicationId (required) string The application ID of the lock owner.

roleAssignment

Property Value Description
principalId (required) string The principal ID
roleDefinitionId (required) string The role definition ID, data file can be used for this
condition string Condition on the role assignment
conditionVersion string Version of the condition. Currently the only accepted value is "2.0"
delegatedManagedIdentityResourceId string Id of the delegated managed identity resource
description string Description of role assignment

general

Property Value Description
tags object Tags of the resource [hashtable]
location (required) string Location of the resource
naming (required) naming Naming module of the resource
resourceGroupName (required) string Name of the resource group where the resource should be located
sharedNaming (required) naming Reference to the default naming
roleAssignments roleAssignment[] Role assignments on the resource
resourceLocks resourceLock[] Resource Locks on the resource

Changelog

6.1.0 (2025-10-06)

Features

  • update resource api versions

6.0.1 (2025-09-24)

Bug Fixes

  • remove deployment name + cleanup

6.0.0 (2025-09-24)

⚠ BREAKING CHANGES

  • remove deprecated outputs

Bug Fixes

  • remove deprecated outputs

5.4.0 (2025-05-05)

Features

  • secure output of primary shared key

5.3.0 (2025-05-05)

Features

  • add secure output of the primary shared key (minimum bicep version 0.35.1)
  • secure output of primary shared key

5.3.0 (2025-05-05)

Features

  • add secure output of the primary shared key (minimum bicep version 0.35.1)

5.2.0 (2025-04-02)

Features

  • add output customerId

5.1.0 (2025-03-26)

Features

  • add resourceName output

5.0.0 (2025-03-17)

⚠ BREAKING CHANGES

  • remove role-assignment principalType parameter

Features

  • remove role-assignment principalType parameter

4.0.0 (2025-01-03)

⚠ BREAKING CHANGES

  • use new toObject function for UserAssignedIdentities. Only breaking when using managed identities.

Features

  • use new toObject function for UserAssignedIdentities. Only breaking when using managed identities.