Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Modules] Added support for Capacity Reservation for the Log Analytics Workspace Module #3345

Merged
merged 2 commits into from
Jun 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion modules/operational-insights/workspaces/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ This module deploys a Log Analytics Workspace.
| `publicNetworkAccessForQuery` | string | `'Enabled'` | `[Disabled, Enabled]` | The network access type for accessing Log Analytics query. |
| `roleAssignments` | array | `[]` | | Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalId' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
| `savedSearches` | _[savedSearches](saved-searches/README.md)_ array | `[]` | | Kusto Query Language searches to save. |
| `serviceTier` | string | `'PerGB2018'` | `[Free, PerGB2018, PerNode, Standalone]` | Service Tier: PerGB2018, Free, Standalone, PerGB or PerNode. |
| `skuCapacityReservationLevel` | int | `100` | | The capacity reservation level in GB for this workspace, when CapacityReservation sku is selected. Must be in increments of 100 between 100 and 5000. |
| `skuName` | string | `'PerGB2018'` | `[CapacityReservation, Free, LACluster, PerGB2018, PerNode, Premium, Standalone, Standard]` | The name of the SKU. |
| `storageInsightsConfigs` | array | `[]` | | List of storage accounts to be read by the workspace. |
| `systemAssignedIdentity` | bool | `False` | | Enables system assigned managed identity on the resource. |
| `tables` | _[tables](tables/README.md)_ array | `[]` | | LAW custom tables to be deployed. |
Expand Down
20 changes: 15 additions & 5 deletions modules/operational-insights/workspaces/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,23 @@ param name string
@description('Optional. Location for all resources.')
param location string = resourceGroup().location

@description('Optional. Service Tier: PerGB2018, Free, Standalone, PerGB or PerNode.')
@description('Optional. The name of the SKU.')
@allowed([
'CapacityReservation'
'Free'
'Standalone'
'PerNode'
'LACluster'
'PerGB2018'
'PerNode'
'Premium'
'Standalone'
'Standard'
])
param serviceTier string = 'PerGB2018'
param skuName string = 'PerGB2018'

@minValue(100)
@maxValue(5000)
@description('Optional. The capacity reservation level in GB for this workspace, when CapacityReservation sku is selected. Must be in increments of 100 between 100 and 5000.')
param skuCapacityReservationLevel int = 100

@description('Optional. List of storage accounts to be read by the workspace.')
param storageInsightsConfigs array = []
Expand Down Expand Up @@ -189,7 +198,8 @@ resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2022-10
enableLogAccessUsingOnlyResourcePermissions: useResourcePermissions
}
sku: {
name: serviceTier
name: skuName
capacityReservationLevel: skuName == 'CapacityReservation' ? skuCapacityReservationLevel : null
}
retentionInDays: dataRetention
workspaceCapping: {
Expand Down
Loading