From 0b4363807eaacde76c03690eac6e36c2ca85becb Mon Sep 17 00:00:00 2001 From: Erika Gressi Date: Mon, 6 Jun 2022 19:27:59 +0200 Subject: [PATCH 1/3] update module cr --- arm/Microsoft.Automation/automationAccounts/deploy.bicep | 3 ++- .../workspaces/linkedServices/deploy.bicep | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/arm/Microsoft.Automation/automationAccounts/deploy.bicep b/arm/Microsoft.Automation/automationAccounts/deploy.bicep index b076c71097..278e449446 100644 --- a/arm/Microsoft.Automation/automationAccounts/deploy.bicep +++ b/arm/Microsoft.Automation/automationAccounts/deploy.bicep @@ -255,11 +255,12 @@ module automationAccount_variables 'variables/deploy.bicep' = [for (variable, in } }] -module automationAccount_linkedService '.bicep/nested_linkedService.bicep' = if (!empty(linkedWorkspaceResourceId)) { +module automationAccount_linkedService '../../Microsoft.OperationalInsights/workspaces/linkedServices/deploy.bicep' = if (!empty(linkedWorkspaceResourceId)) { name: '${uniqueString(deployment().name, location)}-AutoAccount-LinkedService' params: { name: 'automation' logAnalyticsWorkspaceName: last(split(linkedWorkspaceResourceId, '/')) + enableDefaultTelemetry: enableDefaultTelemetry resourceId: automationAccount.id tags: tags } diff --git a/arm/Microsoft.OperationalInsights/workspaces/linkedServices/deploy.bicep b/arm/Microsoft.OperationalInsights/workspaces/linkedServices/deploy.bicep index bc67a4e5f5..73f552cbd0 100644 --- a/arm/Microsoft.OperationalInsights/workspaces/linkedServices/deploy.bicep +++ b/arm/Microsoft.OperationalInsights/workspaces/linkedServices/deploy.bicep @@ -42,11 +42,11 @@ resource linkedService 'Microsoft.OperationalInsights/workspaces/linkedServices@ } } +@description('The name of the deployed linked service.') +output name string = linkedService.name + @description('The resource ID of the deployed linked service.') output resourceId string = linkedService.id @description('The resource group where the linked service is deployed.') output resourceGroupName string = resourceGroup().name - -@description('The name of the deployed linked service.') -output name string = linkedService.name From eca122ad49b7da8d246f4b9bbe0dcc14d056539f Mon Sep 17 00:00:00 2001 From: Erika Gressi Date: Mon, 6 Jun 2022 19:33:42 +0200 Subject: [PATCH 2/3] readme update --- arm/Microsoft.Automation/automationAccounts/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arm/Microsoft.Automation/automationAccounts/readme.md b/arm/Microsoft.Automation/automationAccounts/readme.md index 3f012501fc..c87a3e5d72 100644 --- a/arm/Microsoft.Automation/automationAccounts/readme.md +++ b/arm/Microsoft.Automation/automationAccounts/readme.md @@ -25,7 +25,7 @@ This module deploys an Azure Automation Account. | `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) | | `Microsoft.Network/privateEndpoints` | [2021-05-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Network/2021-05-01/privateEndpoints) | | `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2021-05-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Network/2021-05-01/privateEndpoints/privateDnsZoneGroups) | -| `Microsoft.OperationalInsights/workspaces/linkedServices` | [2020-03-01-preview](https://docs.microsoft.com/en-us/azure/templates/Microsoft.OperationalInsights/2020-03-01-preview/workspaces/linkedServices) | +| `Microsoft.OperationalInsights/workspaces/linkedServices` | [2020-08-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.OperationalInsights/2020-08-01/workspaces/linkedServices) | | `Microsoft.OperationsManagement/solutions` | [2015-11-01-preview](https://docs.microsoft.com/en-us/azure/templates/Microsoft.OperationsManagement/2015-11-01-preview/solutions) | ## Parameters From 6308e5bedc70e785ccdab5ba29c094c9f0ceb194 Mon Sep 17 00:00:00 2001 From: Erika Gressi Date: Mon, 6 Jun 2022 19:35:14 +0200 Subject: [PATCH 3/3] cleanup --- .../.bicep/nested_linkedService.bicep | 37 ------------------- 1 file changed, 37 deletions(-) delete mode 100644 arm/Microsoft.Automation/automationAccounts/.bicep/nested_linkedService.bicep diff --git a/arm/Microsoft.Automation/automationAccounts/.bicep/nested_linkedService.bicep b/arm/Microsoft.Automation/automationAccounts/.bicep/nested_linkedService.bicep deleted file mode 100644 index 651118484b..0000000000 --- a/arm/Microsoft.Automation/automationAccounts/.bicep/nested_linkedService.bicep +++ /dev/null @@ -1,37 +0,0 @@ -@description('Required. Name of the link') -param name string - -@description('Required. Name of the Log Analytics workspace') -param logAnalyticsWorkspaceName string - -@description('Required. The resource ID of the resource that will be linked to the workspace. This should be used for linking resources which require read access.') -param resourceId string = '' - -@description('Optional. The resource ID of the resource that will be linked to the workspace. This should be used for linking resources which require write access.') -param writeAccessResourceId string = '' - -@description('Optional. Tags to configure in the resource.') -param tags object = {} - -resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2021-06-01' existing = { - name: logAnalyticsWorkspaceName -} - -resource linkedService 'Microsoft.OperationalInsights/workspaces/linkedServices@2020-03-01-preview' = { - name: name - parent: logAnalyticsWorkspace - tags: tags - properties: { - resourceId: !empty(resourceId) ? resourceId : null - writeAccessResourceId: !empty(writeAccessResourceId) ? writeAccessResourceId : null - } -} - -@description('The name of the deployed linked service') -output name string = linkedService.name - -@description('The resource ID of the deployed linked service') -output resourceId string = linkedService.id - -@description('The resource group where the linked service is deployed') -output resourceGroupName string = resourceGroup().name