diff --git a/infra-as-code/bicep/modules/logging/README.md b/infra-as-code/bicep/modules/logging/README.md index e337c9c86..809f88fbf 100644 --- a/infra-as-code/bicep/modules/logging/README.md +++ b/infra-as-code/bicep/modules/logging/README.md @@ -27,11 +27,14 @@ The module requires the following required input parameters. | ------------------------------------------ | --------------- | ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | | parLogAnalyticsWorkspaceName | string | Log Analytics Workspace name | Mandatory input, default: `alz-log-analytics` | `alz-log-analytics` | | parLogAnalyticsWorkspaceLocation | string | Region name | Mandatory input, default: `resourceGroup().location` | `eastus` | +| parLogAnalyticsWorkspaceSkuName | string | Log Analytics Workspace sku name | Mandatory input, default `PerGB2018` | `PerGB2018` | | parLogAnalyticsWorkspaceLogRetentionInDays | int | Number of days of log retention for Log Analytics Workspace | Mandatory input between 30-730, default: `365` | `365` | | parLogAnalyticsWorkspaceSolutions | Array of string | Solutions that will be added to the Log Analytics Workspace | 1 or more of `AgentHealthAssessment`, `AntiMalware`, `AzureActivity`, `ChangeTracking`, `Security`, `SecurityInsights`, `ServiceMap`, `SQLAssessment`, `Updates`, `VMInsights`, default: *all solutions* | Empty: `[]`
1 Solution: `["SecurityInsights"]`
Many Solutions: `["SecurityInsights","VMInsights"]` | | parAutomationAccountName | string | Automation account name | Mandatory input, name must be unique in the subscription, default: `alz-automation-account` | `alz-automation-account` | | parAutomationAccountLocation | string | Region name | Mandatory input, default: `resourceGroup().location` | `eastus` | | parTags | object | Empty object `{}` | Array of Tags to be applied to all resources in the logging module | `{"key": "value"}` | +| parAutomationAccountTags | object | Empty object `{}` | Array of Tags to be applied to Automation Account in the logging module | `{"key": "value"}` | +| parLogAnalyticsWorkspaceTags | object | Empty object `{}` | Array of Tags to be applied to Log Analytics Workspace in the logging module | `{"key": "value"}` | | parTelemetryOptOut | bool | Set Parameter to true to Opt-out of deployment telemetry | Mandatory input, default: `false` | `false` | ## Outputs diff --git a/infra-as-code/bicep/modules/logging/logging.bicep b/infra-as-code/bicep/modules/logging/logging.bicep index 861f11c48..07e988e36 100644 --- a/infra-as-code/bicep/modules/logging/logging.bicep +++ b/infra-as-code/bicep/modules/logging/logging.bicep @@ -4,6 +4,19 @@ param parLogAnalyticsWorkspaceName string = 'alz-log-analytics' @description('Log Analytics region name - Ensure the regions selected is a supported mapping as per: https://docs.microsoft.com/azure/automation/how-to/region-mappings - DEFAULT VALUE: resourceGroup().location') param parLogAnalyticsWorkspaceLocation string = resourceGroup().location +@allowed([ + 'CapacityReservation' + 'Free' + 'LACluster' + 'PerGB2018' + 'PerNode' + 'Premium' + 'Standalone' + 'Standard' +]) +@description('Log Analytics Workspace sku name. - DEFAULT VALUE: PerGB2018') +param parLogAnalyticsWorkspaceSkuName string = 'PerGB2018' + @minValue(30) @maxValue(730) @description('Number of days of log retention for Log Analytics Workspace. - DEFAULT VALUE: 365') @@ -45,6 +58,12 @@ param parAutomationAccountLocation string = resourceGroup().location @description('Tags you would like to be applied to all resources in this module') param parTags object = {} +@description('Tags you would like to be applied to Automation Account. - DEFAULT VALUE: parTags value') +param parAutomationAccountTags object = parTags + +@description('Tags you would like to be applied to Log Analytics Workspace. - DEFAULT VALUE: parTags value') +param parLogAnalyticsWorkspaceTags object = parTags + @description('Set Parameter to true to Opt-out of deployment telemetry') param parTelemetryOptOut bool = false @@ -54,7 +73,7 @@ var varCuaid = 'f8087c67-cc41-46b2-994d-66e4b661860d' resource resAutomationAccount 'Microsoft.Automation/automationAccounts@2019-06-01' = { name: parAutomationAccountName location: parAutomationAccountLocation - tags: parTags + tags: parAutomationAccountTags properties: { sku: { name: 'Basic' @@ -65,10 +84,10 @@ resource resAutomationAccount 'Microsoft.Automation/automationAccounts@2019-06-0 resource resLogAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2020-08-01' = { name: parLogAnalyticsWorkspaceName location: parLogAnalyticsWorkspaceLocation - tags: parTags + tags: parLogAnalyticsWorkspaceTags properties: { sku: { - name: 'PerNode' + name: parLogAnalyticsWorkspaceSkuName } retentionInDays: parLogAnalyticsWorkspaceLogRetentionInDays } diff --git a/infra-as-code/bicep/modules/logging/logging.parameters.example.json b/infra-as-code/bicep/modules/logging/logging.parameters.example.json index 168c3a183..23f77e38f 100644 --- a/infra-as-code/bicep/modules/logging/logging.parameters.example.json +++ b/infra-as-code/bicep/modules/logging/logging.parameters.example.json @@ -8,6 +8,9 @@ "parLogAnalyticsWorkspaceLocation": { "value": "eastus" }, + "parLogAnalyticsWorkspaceSkuName": { + "value": "PerGB2018" + }, "parLogAnalyticsWorkspaceLogRetentionInDays": { "value": 365 }, diff --git a/infra-as-code/bicep/modules/logging/mc-logging.parameters.example.json b/infra-as-code/bicep/modules/logging/mc-logging.parameters.example.json index 317be4b70..d0b1cebc9 100644 --- a/infra-as-code/bicep/modules/logging/mc-logging.parameters.example.json +++ b/infra-as-code/bicep/modules/logging/mc-logging.parameters.example.json @@ -8,6 +8,9 @@ "parLogAnalyticsWorkspaceLocation": { "value": "chinaeast2" }, + "parLogAnalyticsWorkspaceSkuName": { + "value": "PerGB2018" + }, "parLogAnalyticsWorkspaceLogRetentionInDays": { "value": 365 },