generated from ks6088ts/template-python
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add log analytics workspace to enable logging on IoT Hub
- Loading branch information
Showing
3 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Parameters | ||
@description('Specifies the name of the Log Analytics workspace.') | ||
param name string | ||
|
||
@description('Specifies the service tier of the workspace: Free, Standalone, PerNode, Per-GB.') | ||
@allowed([ | ||
'Free' | ||
'Standalone' | ||
'PerNode' | ||
'PerGB2018' | ||
]) | ||
param sku string = 'PerGB2018' | ||
|
||
@description('Specifies the workspace data retention in days. -1 means Unlimited retention for the Unlimited Sku. 730 days is the maximum allowed for all other Skus.') | ||
param retentionInDays int = 60 | ||
|
||
@description('Specifies the location.') | ||
param location string = resourceGroup().location | ||
|
||
@description('Specifies the resource tags.') | ||
param tags object | ||
|
||
// Resources | ||
resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2023-09-01' = { | ||
name: name | ||
tags: tags | ||
location: location | ||
properties: { | ||
sku: { | ||
name: sku | ||
} | ||
retentionInDays: retentionInDays | ||
} | ||
} | ||
|
||
//Outputs | ||
output id string = logAnalyticsWorkspace.id | ||
output name string = logAnalyticsWorkspace.name | ||
output customerId string = logAnalyticsWorkspace.properties.customerId |