Unlink log analytics workspace and automation account (#555)

Co-authored-by: Jack Tracey <41163455+jtracey93@users.noreply.github.com>
This commit is contained in:
Eskil Uhlving Larsen 2023-06-14 16:02:23 +02:00 коммит произвёл GitHub
Родитель c4f94b45e2
Коммит 48a1bfd50e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 22 добавлений и 1 удалений

Просмотреть файл

@ -11,6 +11,7 @@ parLogAnalyticsWorkspaceLocation | No | Log Analytics region name - Ensure
parLogAnalyticsWorkspaceSkuName | No | Log Analytics Workspace sku name.
parLogAnalyticsWorkspaceLogRetentionInDays | No | Number of days of log retention for Log Analytics Workspace.
parLogAnalyticsWorkspaceSolutions | No | Solutions that will be added to the Log Analytics Workspace.
parLogAnalyticsWorkspaceLinkAutomationAccount | No | Log Analytics Workspace should be linked with the automation account.
parAutomationAccountName | No | Automation account name.
parAutomationAccountLocation | No | Automation Account region name. - Ensure the regions selected is a supported mapping as per: https://docs.microsoft.com/azure/automation/how-to/region-mappings.
parAutomationAccountUseManagedIdentity | No | Automation Account - use managed identity.
@ -63,6 +64,14 @@ Solutions that will be added to the Log Analytics Workspace.
- Allowed values: `AgentHealthAssessment`, `AntiMalware`, `ChangeTracking`, `Security`, `SecurityInsights`, `ServiceMap`, `SQLAdvancedThreatProtection`, `SQLVulnerabilityAssessment`, `SQLAssessment`, `Updates`, `VMInsights`
### parLogAnalyticsWorkspaceLinkAutomationAccount
![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square)
Log Analytics Workspace should be linked with the automation account.
- Default value: `True`
### parAutomationAccountName
![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square)
@ -166,6 +175,9 @@ outAutomationAccountId | string |
"VMInsights"
]
},
"parLogAnalyticsWorkspaceLinkAutomationAccount": {
"value": true
},
"parAutomationAccountName": {
"value": "alz-automation-account"
},

Просмотреть файл

@ -52,6 +52,9 @@ param parLogAnalyticsWorkspaceSolutions array = [
'VMInsights'
]
@sys.description('Log Analytics Workspace should be linked with the automation account.')
param parLogAnalyticsWorkspaceLinkAutomationAccount bool = true
@sys.description('Automation account name.')
param parAutomationAccountName string = 'alz-automation-account'
@ -120,7 +123,7 @@ resource resLogAnalyticsWorkspaceSolutions 'Microsoft.OperationsManagement/solut
}
}]
resource resLogAnalyticsLinkedServiceForAutomationAccount 'Microsoft.OperationalInsights/workspaces/linkedServices@2020-08-01' = {
resource resLogAnalyticsLinkedServiceForAutomationAccount 'Microsoft.OperationalInsights/workspaces/linkedServices@2020-08-01' = if (parLogAnalyticsWorkspaceLinkAutomationAccount) {
name: '${resLogAnalyticsWorkspace.name}/Automation'
properties: {
resourceId: resAutomationAccount.id

Просмотреть файл

@ -28,6 +28,9 @@
"VMInsights"
]
},
"parLogAnalyticsWorkspaceLinkAutomationAccount": {
"value": true
},
"parAutomationAccountName": {
"value": "alz-automation-account"
},

Просмотреть файл

@ -28,6 +28,9 @@
"VMInsights"
]
},
"parLogAnalyticsWorkspaceLinkAutomationAccount": {
"value": true
},
"parAutomationAccountName": {
"value": "alz-automation-account"
},