From 806511db0a637802ae82704742a8c996c2780a11 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Sat, 10 Sep 2022 18:10:45 +0200 Subject: [PATCH 01/13] Updated OperationsManagement Solutions to new dependency approach --- .../ms.operationsmanagement.solutions.yml | 3 +- .../solutions/.test/min.parameters.json | 12 ----- .../solutions/.test/min/dependencies.bicep | 13 +++++ .../solutions/.test/min/deploy.test.bicep | 46 ++++++++++++++++++ .../solutions/.test/ms.parameters.json | 18 ------- .../solutions/.test/ms/dependencies.bicep | 13 +++++ .../solutions/.test/ms/deploy.test.bicep | 48 +++++++++++++++++++ .../solutions/.test/nonms.parameters.json | 18 ------- .../solutions/.test/nonms/dependencies.bicep | 13 +++++ .../solutions/.test/nonms/deploy.test.bicep | 48 +++++++++++++++++++ .../solutions/readme.md | 30 ++++++------ 11 files changed, 197 insertions(+), 65 deletions(-) delete mode 100644 modules/Microsoft.OperationsManagement/solutions/.test/min.parameters.json create mode 100644 modules/Microsoft.OperationsManagement/solutions/.test/min/dependencies.bicep create mode 100644 modules/Microsoft.OperationsManagement/solutions/.test/min/deploy.test.bicep delete mode 100644 modules/Microsoft.OperationsManagement/solutions/.test/ms.parameters.json create mode 100644 modules/Microsoft.OperationsManagement/solutions/.test/ms/dependencies.bicep create mode 100644 modules/Microsoft.OperationsManagement/solutions/.test/ms/deploy.test.bicep delete mode 100644 modules/Microsoft.OperationsManagement/solutions/.test/nonms.parameters.json create mode 100644 modules/Microsoft.OperationsManagement/solutions/.test/nonms/dependencies.bicep create mode 100644 modules/Microsoft.OperationsManagement/solutions/.test/nonms/deploy.test.bicep diff --git a/.github/workflows/ms.operationsmanagement.solutions.yml b/.github/workflows/ms.operationsmanagement.solutions.yml index d55292826d..f833cf12a5 100644 --- a/.github/workflows/ms.operationsmanagement.solutions.yml +++ b/.github/workflows/ms.operationsmanagement.solutions.yml @@ -106,8 +106,7 @@ jobs: - name: 'Using test file [${{ matrix.moduleTestFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/${{ matrix.moduleTestFilePaths }}' + templateFilePath: '${{ env.modulePath }}/${{ matrix.moduleTestFilePaths }}' location: '${{ env.location }}' resourceGroupName: '${{ env.resourceGroupName }}' subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' diff --git a/modules/Microsoft.OperationsManagement/solutions/.test/min.parameters.json b/modules/Microsoft.OperationsManagement/solutions/.test/min.parameters.json deleted file mode 100644 index 6844bb4688..0000000000 --- a/modules/Microsoft.OperationsManagement/solutions/.test/min.parameters.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "Updates" - }, - "logAnalyticsWorkspaceName": { - "value": "adp-<>-az-law-sol-001" - } - } -} diff --git a/modules/Microsoft.OperationsManagement/solutions/.test/min/dependencies.bicep b/modules/Microsoft.OperationsManagement/solutions/.test/min/dependencies.bicep new file mode 100644 index 0000000000..41375545a2 --- /dev/null +++ b/modules/Microsoft.OperationsManagement/solutions/.test/min/dependencies.bicep @@ -0,0 +1,13 @@ +@description('Optional. The location to deploy to.') +param location string = resourceGroup().location + +@description('Required. The name of the Log Analytics Workspace to create.') +param logAnalyticsWorkspaceName string + +resource logAnalytics 'Microsoft.OperationalInsights/workspaces@2021-06-01' = { + name: logAnalyticsWorkspaceName + location: location +} + +@description('The resource ID of the created Log Analytics Workspace.') +output logAnalyticsResourceId string = logAnalytics.id diff --git a/modules/Microsoft.OperationsManagement/solutions/.test/min/deploy.test.bicep b/modules/Microsoft.OperationsManagement/solutions/.test/min/deploy.test.bicep new file mode 100644 index 0000000000..3dd62ff4f3 --- /dev/null +++ b/modules/Microsoft.OperationsManagement/solutions/.test/min/deploy.test.bicep @@ -0,0 +1,46 @@ +targetScope = 'subscription' + +// ========== // +// Parameters // +// ========== // +@description('Optional. The name of the resource group to deploy for a testing purposes') +@maxLength(90) +param resourceGroupName string = 'ms.operationsmanagement.solutions-${serviceShort}-rg' + +@description('Optional. The location to deploy resources to') +param location string = deployment().location + +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints') +param serviceShort string = 'omsmin' + +// =========== // +// Deployments // +// =========== // + +// General resources +// ================= +resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { + name: resourceGroupName + location: location +} + +module resourceGroupResources 'dependencies.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name, location)}-paramNested' + params: { + logAnalyticsWorkspaceName: 'dep-<>-law-${serviceShort}' + } +} + +// ============== // +// Test Execution // +// ============== // + +module testDeployment '../../deploy.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name)}-test-${serviceShort}' + params: { + name: '<>${serviceShort}001' + logAnalyticsWorkspaceName: last(split(resourceGroupResources.outputs.logAnalyticsResourceId, '/')) + } +} diff --git a/modules/Microsoft.OperationsManagement/solutions/.test/ms.parameters.json b/modules/Microsoft.OperationsManagement/solutions/.test/ms.parameters.json deleted file mode 100644 index c7dcb66400..0000000000 --- a/modules/Microsoft.OperationsManagement/solutions/.test/ms.parameters.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "AzureAutomation" - }, - "logAnalyticsWorkspaceName": { - "value": "adp-<>-az-law-sol-001" - }, - "product": { - "value": "OMSGallery" - }, - "publisher": { - "value": "Microsoft" - } - } -} diff --git a/modules/Microsoft.OperationsManagement/solutions/.test/ms/dependencies.bicep b/modules/Microsoft.OperationsManagement/solutions/.test/ms/dependencies.bicep new file mode 100644 index 0000000000..41375545a2 --- /dev/null +++ b/modules/Microsoft.OperationsManagement/solutions/.test/ms/dependencies.bicep @@ -0,0 +1,13 @@ +@description('Optional. The location to deploy to.') +param location string = resourceGroup().location + +@description('Required. The name of the Log Analytics Workspace to create.') +param logAnalyticsWorkspaceName string + +resource logAnalytics 'Microsoft.OperationalInsights/workspaces@2021-06-01' = { + name: logAnalyticsWorkspaceName + location: location +} + +@description('The resource ID of the created Log Analytics Workspace.') +output logAnalyticsResourceId string = logAnalytics.id diff --git a/modules/Microsoft.OperationsManagement/solutions/.test/ms/deploy.test.bicep b/modules/Microsoft.OperationsManagement/solutions/.test/ms/deploy.test.bicep new file mode 100644 index 0000000000..c6a8480441 --- /dev/null +++ b/modules/Microsoft.OperationsManagement/solutions/.test/ms/deploy.test.bicep @@ -0,0 +1,48 @@ +targetScope = 'subscription' + +// ========== // +// Parameters // +// ========== // +@description('Optional. The name of the resource group to deploy for a testing purposes') +@maxLength(90) +param resourceGroupName string = 'ms.operationsmanagement.solutions-${serviceShort}-rg' + +@description('Optional. The location to deploy resources to') +param location string = deployment().location + +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints') +param serviceShort string = 'omsms' + +// =========== // +// Deployments // +// =========== // + +// General resources +// ================= +resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { + name: resourceGroupName + location: location +} + +module resourceGroupResources 'dependencies.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name, location)}-paramNested' + params: { + logAnalyticsWorkspaceName: 'dep-<>-law-${serviceShort}' + } +} + +// ============== // +// Test Execution // +// ============== // + +module testDeployment '../../deploy.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name)}-test-${serviceShort}' + params: { + name: '<>${serviceShort}001' + logAnalyticsWorkspaceName: last(split(resourceGroupResources.outputs.logAnalyticsResourceId, '/')) + product: 'OMSGallery' + publisher: 'Microsoft' + } +} diff --git a/modules/Microsoft.OperationsManagement/solutions/.test/nonms.parameters.json b/modules/Microsoft.OperationsManagement/solutions/.test/nonms.parameters.json deleted file mode 100644 index a040bf8d2f..0000000000 --- a/modules/Microsoft.OperationsManagement/solutions/.test/nonms.parameters.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "nonmsTestSolution" - }, - "logAnalyticsWorkspaceName": { - "value": "adp-<>-az-law-sol-001" - }, - "product": { - "value": "nonmsTestSolutionProduct" - }, - "publisher": { - "value": "nonmsTestSolutionPublisher" - } - } -} diff --git a/modules/Microsoft.OperationsManagement/solutions/.test/nonms/dependencies.bicep b/modules/Microsoft.OperationsManagement/solutions/.test/nonms/dependencies.bicep new file mode 100644 index 0000000000..41375545a2 --- /dev/null +++ b/modules/Microsoft.OperationsManagement/solutions/.test/nonms/dependencies.bicep @@ -0,0 +1,13 @@ +@description('Optional. The location to deploy to.') +param location string = resourceGroup().location + +@description('Required. The name of the Log Analytics Workspace to create.') +param logAnalyticsWorkspaceName string + +resource logAnalytics 'Microsoft.OperationalInsights/workspaces@2021-06-01' = { + name: logAnalyticsWorkspaceName + location: location +} + +@description('The resource ID of the created Log Analytics Workspace.') +output logAnalyticsResourceId string = logAnalytics.id diff --git a/modules/Microsoft.OperationsManagement/solutions/.test/nonms/deploy.test.bicep b/modules/Microsoft.OperationsManagement/solutions/.test/nonms/deploy.test.bicep new file mode 100644 index 0000000000..d9ef6df08b --- /dev/null +++ b/modules/Microsoft.OperationsManagement/solutions/.test/nonms/deploy.test.bicep @@ -0,0 +1,48 @@ +targetScope = 'subscription' + +// ========== // +// Parameters // +// ========== // +@description('Optional. The name of the resource group to deploy for a testing purposes') +@maxLength(90) +param resourceGroupName string = 'ms.operationsmanagement.solutions-${serviceShort}-rg' + +@description('Optional. The location to deploy resources to') +param location string = deployment().location + +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints') +param serviceShort string = 'omsnonms' + +// =========== // +// Deployments // +// =========== // + +// General resources +// ================= +resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { + name: resourceGroupName + location: location +} + +module resourceGroupResources 'dependencies.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name, location)}-paramNested' + params: { + logAnalyticsWorkspaceName: 'dep-<>-law-${serviceShort}' + } +} + +// ============== // +// Test Execution // +// ============== // + +module testDeployment '../../deploy.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name)}-test-${serviceShort}' + params: { + name: '<>${serviceShort}001' + logAnalyticsWorkspaceName: last(split(resourceGroupResources.outputs.logAnalyticsResourceId, '/')) + product: 'nonmsTestSolutionProduct' + publisher: 'nonmsTestSolutionPublisher' + } +} diff --git a/modules/Microsoft.OperationsManagement/solutions/readme.md b/modules/Microsoft.OperationsManagement/solutions/readme.md index e53e89e962..9fc760c39f 100644 --- a/modules/Microsoft.OperationsManagement/solutions/readme.md +++ b/modules/Microsoft.OperationsManagement/solutions/readme.md @@ -61,11 +61,11 @@ The following module usage examples are retrieved from the content of the files ```bicep module solutions './Microsoft.OperationsManagement/solutions/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-Solutions' + name: '${uniqueString(deployment().name)}-test-omsmin' params: { // Required parameters - logAnalyticsWorkspaceName: 'adp-<>-az-law-sol-001' - name: 'Updates' + logAnalyticsWorkspaceName: '' + name: '<>omsmin001' } } ``` @@ -84,10 +84,10 @@ module solutions './Microsoft.OperationsManagement/solutions/deploy.bicep' = { "parameters": { // Required parameters "logAnalyticsWorkspaceName": { - "value": "adp-<>-az-law-sol-001" + "value": "" }, "name": { - "value": "Updates" + "value": "<>omsmin001" } } } @@ -104,11 +104,11 @@ module solutions './Microsoft.OperationsManagement/solutions/deploy.bicep' = { ```bicep module solutions './Microsoft.OperationsManagement/solutions/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-Solutions' + name: '${uniqueString(deployment().name)}-test-omsms' params: { // Required parameters - logAnalyticsWorkspaceName: 'adp-<>-az-law-sol-001' - name: 'AzureAutomation' + logAnalyticsWorkspaceName: '' + name: '<>omsms001' // Non-required parameters product: 'OMSGallery' publisher: 'Microsoft' @@ -130,10 +130,10 @@ module solutions './Microsoft.OperationsManagement/solutions/deploy.bicep' = { "parameters": { // Required parameters "logAnalyticsWorkspaceName": { - "value": "adp-<>-az-law-sol-001" + "value": "" }, "name": { - "value": "AzureAutomation" + "value": "<>omsms001" }, // Non-required parameters "product": { @@ -157,11 +157,11 @@ module solutions './Microsoft.OperationsManagement/solutions/deploy.bicep' = { ```bicep module solutions './Microsoft.OperationsManagement/solutions/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-Solutions' + name: '${uniqueString(deployment().name)}-test-omsnonms' params: { // Required parameters - logAnalyticsWorkspaceName: 'adp-<>-az-law-sol-001' - name: 'nonmsTestSolution' + logAnalyticsWorkspaceName: '' + name: '<>omsnonms001' // Non-required parameters product: 'nonmsTestSolutionProduct' publisher: 'nonmsTestSolutionPublisher' @@ -183,10 +183,10 @@ module solutions './Microsoft.OperationsManagement/solutions/deploy.bicep' = { "parameters": { // Required parameters "logAnalyticsWorkspaceName": { - "value": "adp-<>-az-law-sol-001" + "value": "" }, "name": { - "value": "nonmsTestSolution" + "value": "<>omsnonms001" }, // Non-required parameters "product": { From 4be5213a7dceb53a09b584197b0b8f34a583d1af Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Sun, 18 Sep 2022 23:48:13 +0200 Subject: [PATCH 02/13] Update modules/Microsoft.OperationsManagement/solutions/.test/min/deploy.test.bicep --- .../solutions/.test/min/deploy.test.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.OperationsManagement/solutions/.test/min/deploy.test.bicep b/modules/Microsoft.OperationsManagement/solutions/.test/min/deploy.test.bicep index 3dd62ff4f3..0d1a8d1173 100644 --- a/modules/Microsoft.OperationsManagement/solutions/.test/min/deploy.test.bicep +++ b/modules/Microsoft.OperationsManagement/solutions/.test/min/deploy.test.bicep @@ -3,7 +3,7 @@ targetScope = 'subscription' // ========== // // Parameters // // ========== // -@description('Optional. The name of the resource group to deploy for a testing purposes') +@description('Optional. The name of the resource group to deploy for testing purposes') @maxLength(90) param resourceGroupName string = 'ms.operationsmanagement.solutions-${serviceShort}-rg' From de969c76f4f05651527e375e594824936794717e Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Sun, 18 Sep 2022 23:48:36 +0200 Subject: [PATCH 03/13] Update modules/Microsoft.OperationsManagement/solutions/.test/ms/deploy.test.bicep --- .../solutions/.test/ms/deploy.test.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.OperationsManagement/solutions/.test/ms/deploy.test.bicep b/modules/Microsoft.OperationsManagement/solutions/.test/ms/deploy.test.bicep index c6a8480441..a4c055bbbf 100644 --- a/modules/Microsoft.OperationsManagement/solutions/.test/ms/deploy.test.bicep +++ b/modules/Microsoft.OperationsManagement/solutions/.test/ms/deploy.test.bicep @@ -3,7 +3,7 @@ targetScope = 'subscription' // ========== // // Parameters // // ========== // -@description('Optional. The name of the resource group to deploy for a testing purposes') +@description('Optional. The name of the resource group to deploy for testing purposes') @maxLength(90) param resourceGroupName string = 'ms.operationsmanagement.solutions-${serviceShort}-rg' From 6a0712934a4d66100d6912debc5f22a3ac29674a Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Sun, 18 Sep 2022 23:48:56 +0200 Subject: [PATCH 04/13] Update modules/Microsoft.OperationsManagement/solutions/.test/nonms/deploy.test.bicep --- .../solutions/.test/nonms/deploy.test.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.OperationsManagement/solutions/.test/nonms/deploy.test.bicep b/modules/Microsoft.OperationsManagement/solutions/.test/nonms/deploy.test.bicep index d9ef6df08b..0f5aa2e652 100644 --- a/modules/Microsoft.OperationsManagement/solutions/.test/nonms/deploy.test.bicep +++ b/modules/Microsoft.OperationsManagement/solutions/.test/nonms/deploy.test.bicep @@ -3,7 +3,7 @@ targetScope = 'subscription' // ========== // // Parameters // // ========== // -@description('Optional. The name of the resource group to deploy for a testing purposes') +@description('Optional. The name of the resource group to deploy for testing purposes') @maxLength(90) param resourceGroupName string = 'ms.operationsmanagement.solutions-${serviceShort}-rg' From 7359739b0cf8ef39a64714822301cce0568a43c6 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Wed, 5 Oct 2022 21:32:13 +0200 Subject: [PATCH 05/13] Update to latest --- .../solutions/.test/min/deploy.test.bicep | 6 +++--- .../solutions/.test/ms/deploy.test.bicep | 6 +++--- .../solutions/.test/nonms/deploy.test.bicep | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/Microsoft.OperationsManagement/solutions/.test/min/deploy.test.bicep b/modules/Microsoft.OperationsManagement/solutions/.test/min/deploy.test.bicep index 0d1a8d1173..f38b04af10 100644 --- a/modules/Microsoft.OperationsManagement/solutions/.test/min/deploy.test.bicep +++ b/modules/Microsoft.OperationsManagement/solutions/.test/min/deploy.test.bicep @@ -3,14 +3,14 @@ targetScope = 'subscription' // ========== // // Parameters // // ========== // -@description('Optional. The name of the resource group to deploy for testing purposes') +@description('Optional. The name of the resource group to deploy for testing purposes.') @maxLength(90) param resourceGroupName string = 'ms.operationsmanagement.solutions-${serviceShort}-rg' -@description('Optional. The location to deploy resources to') +@description('Optional. The location to deploy resources to.') param location string = deployment().location -@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints') +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.') param serviceShort string = 'omsmin' // =========== // diff --git a/modules/Microsoft.OperationsManagement/solutions/.test/ms/deploy.test.bicep b/modules/Microsoft.OperationsManagement/solutions/.test/ms/deploy.test.bicep index a4c055bbbf..1aedc5a5b6 100644 --- a/modules/Microsoft.OperationsManagement/solutions/.test/ms/deploy.test.bicep +++ b/modules/Microsoft.OperationsManagement/solutions/.test/ms/deploy.test.bicep @@ -3,14 +3,14 @@ targetScope = 'subscription' // ========== // // Parameters // // ========== // -@description('Optional. The name of the resource group to deploy for testing purposes') +@description('Optional. The name of the resource group to deploy for testing purposes.') @maxLength(90) param resourceGroupName string = 'ms.operationsmanagement.solutions-${serviceShort}-rg' -@description('Optional. The location to deploy resources to') +@description('Optional. The location to deploy resources to.') param location string = deployment().location -@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints') +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.') param serviceShort string = 'omsms' // =========== // diff --git a/modules/Microsoft.OperationsManagement/solutions/.test/nonms/deploy.test.bicep b/modules/Microsoft.OperationsManagement/solutions/.test/nonms/deploy.test.bicep index 0f5aa2e652..99252b37f2 100644 --- a/modules/Microsoft.OperationsManagement/solutions/.test/nonms/deploy.test.bicep +++ b/modules/Microsoft.OperationsManagement/solutions/.test/nonms/deploy.test.bicep @@ -3,14 +3,14 @@ targetScope = 'subscription' // ========== // // Parameters // // ========== // -@description('Optional. The name of the resource group to deploy for testing purposes') +@description('Optional. The name of the resource group to deploy for testing purposes.') @maxLength(90) param resourceGroupName string = 'ms.operationsmanagement.solutions-${serviceShort}-rg' -@description('Optional. The location to deploy resources to') +@description('Optional. The location to deploy resources to.') param location string = deployment().location -@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints') +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.') param serviceShort string = 'omsnonms' // =========== // From 5de5bd3685402f4fd9761ad45bf060b708b640d1 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Mon, 24 Oct 2022 16:45:59 +0200 Subject: [PATCH 06/13] Ajdusted names --- .../solutions/.test/min/deploy.test.bicep | 2 +- .../solutions/.test/ms/deploy.test.bicep | 2 +- .../Microsoft.OperationsManagement/solutions/readme.md | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/Microsoft.OperationsManagement/solutions/.test/min/deploy.test.bicep b/modules/Microsoft.OperationsManagement/solutions/.test/min/deploy.test.bicep index f38b04af10..c218e41896 100644 --- a/modules/Microsoft.OperationsManagement/solutions/.test/min/deploy.test.bicep +++ b/modules/Microsoft.OperationsManagement/solutions/.test/min/deploy.test.bicep @@ -40,7 +40,7 @@ module testDeployment '../../deploy.bicep' = { scope: resourceGroup name: '${uniqueString(deployment().name)}-test-${serviceShort}' params: { - name: '<>${serviceShort}001' + name: 'Updates' logAnalyticsWorkspaceName: last(split(resourceGroupResources.outputs.logAnalyticsResourceId, '/')) } } diff --git a/modules/Microsoft.OperationsManagement/solutions/.test/ms/deploy.test.bicep b/modules/Microsoft.OperationsManagement/solutions/.test/ms/deploy.test.bicep index 1aedc5a5b6..81dd1c7533 100644 --- a/modules/Microsoft.OperationsManagement/solutions/.test/ms/deploy.test.bicep +++ b/modules/Microsoft.OperationsManagement/solutions/.test/ms/deploy.test.bicep @@ -40,7 +40,7 @@ module testDeployment '../../deploy.bicep' = { scope: resourceGroup name: '${uniqueString(deployment().name)}-test-${serviceShort}' params: { - name: '<>${serviceShort}001' + name: 'AzureAutomation' logAnalyticsWorkspaceName: last(split(resourceGroupResources.outputs.logAnalyticsResourceId, '/')) product: 'OMSGallery' publisher: 'Microsoft' diff --git a/modules/Microsoft.OperationsManagement/solutions/readme.md b/modules/Microsoft.OperationsManagement/solutions/readme.md index d9447bef76..df409cc351 100644 --- a/modules/Microsoft.OperationsManagement/solutions/readme.md +++ b/modules/Microsoft.OperationsManagement/solutions/readme.md @@ -67,7 +67,7 @@ module solutions './Microsoft.OperationsManagement/solutions/deploy.bicep' = { params: { // Required parameters logAnalyticsWorkspaceName: '' - name: '<>omsmin001' + name: 'Updates' } } ``` @@ -89,7 +89,7 @@ module solutions './Microsoft.OperationsManagement/solutions/deploy.bicep' = { "value": "" }, "name": { - "value": "<>omsmin001" + "value": "Updates" } } } @@ -110,7 +110,7 @@ module solutions './Microsoft.OperationsManagement/solutions/deploy.bicep' = { params: { // Required parameters logAnalyticsWorkspaceName: '' - name: '<>omsms001' + name: 'AzureAutomation' // Non-required parameters product: 'OMSGallery' publisher: 'Microsoft' @@ -135,7 +135,7 @@ module solutions './Microsoft.OperationsManagement/solutions/deploy.bicep' = { "value": "" }, "name": { - "value": "<>omsms001" + "value": "AzureAutomation" }, // Non-required parameters "product": { From 36de0b42b768ed70b0ba63fd1fc1c52fb575be6e Mon Sep 17 00:00:00 2001 From: MrMCake Date: Fri, 4 Nov 2022 16:04:20 +0100 Subject: [PATCH 07/13] Update to latest --- .../solutions/.test/min/dependencies.bicep | 4 ++-- .../solutions/.test/min/deploy.test.bicep | 2 +- .../solutions/.test/ms/dependencies.bicep | 4 ++-- .../solutions/.test/ms/deploy.test.bicep | 2 +- .../solutions/.test/nonms/dependencies.bicep | 4 ++-- .../solutions/.test/nonms/deploy.test.bicep | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/Microsoft.OperationsManagement/solutions/.test/min/dependencies.bicep b/modules/Microsoft.OperationsManagement/solutions/.test/min/dependencies.bicep index 41375545a2..8933ed596e 100644 --- a/modules/Microsoft.OperationsManagement/solutions/.test/min/dependencies.bicep +++ b/modules/Microsoft.OperationsManagement/solutions/.test/min/dependencies.bicep @@ -9,5 +9,5 @@ resource logAnalytics 'Microsoft.OperationalInsights/workspaces@2021-06-01' = { location: location } -@description('The resource ID of the created Log Analytics Workspace.') -output logAnalyticsResourceId string = logAnalytics.id +@description('The name of the created Log Analytics Workspace.') +output logAnalyticsName string = logAnalytics.name diff --git a/modules/Microsoft.OperationsManagement/solutions/.test/min/deploy.test.bicep b/modules/Microsoft.OperationsManagement/solutions/.test/min/deploy.test.bicep index c218e41896..21b2c71224 100644 --- a/modules/Microsoft.OperationsManagement/solutions/.test/min/deploy.test.bicep +++ b/modules/Microsoft.OperationsManagement/solutions/.test/min/deploy.test.bicep @@ -41,6 +41,6 @@ module testDeployment '../../deploy.bicep' = { name: '${uniqueString(deployment().name)}-test-${serviceShort}' params: { name: 'Updates' - logAnalyticsWorkspaceName: last(split(resourceGroupResources.outputs.logAnalyticsResourceId, '/')) + logAnalyticsWorkspaceName: resourceGroupResources.outputs.logAnalyticsName } } diff --git a/modules/Microsoft.OperationsManagement/solutions/.test/ms/dependencies.bicep b/modules/Microsoft.OperationsManagement/solutions/.test/ms/dependencies.bicep index 41375545a2..8933ed596e 100644 --- a/modules/Microsoft.OperationsManagement/solutions/.test/ms/dependencies.bicep +++ b/modules/Microsoft.OperationsManagement/solutions/.test/ms/dependencies.bicep @@ -9,5 +9,5 @@ resource logAnalytics 'Microsoft.OperationalInsights/workspaces@2021-06-01' = { location: location } -@description('The resource ID of the created Log Analytics Workspace.') -output logAnalyticsResourceId string = logAnalytics.id +@description('The name of the created Log Analytics Workspace.') +output logAnalyticsName string = logAnalytics.name diff --git a/modules/Microsoft.OperationsManagement/solutions/.test/ms/deploy.test.bicep b/modules/Microsoft.OperationsManagement/solutions/.test/ms/deploy.test.bicep index 81dd1c7533..7a6b6c2ab8 100644 --- a/modules/Microsoft.OperationsManagement/solutions/.test/ms/deploy.test.bicep +++ b/modules/Microsoft.OperationsManagement/solutions/.test/ms/deploy.test.bicep @@ -41,7 +41,7 @@ module testDeployment '../../deploy.bicep' = { name: '${uniqueString(deployment().name)}-test-${serviceShort}' params: { name: 'AzureAutomation' - logAnalyticsWorkspaceName: last(split(resourceGroupResources.outputs.logAnalyticsResourceId, '/')) + logAnalyticsWorkspaceName: resourceGroupResources.outputs.logAnalyticsName product: 'OMSGallery' publisher: 'Microsoft' } diff --git a/modules/Microsoft.OperationsManagement/solutions/.test/nonms/dependencies.bicep b/modules/Microsoft.OperationsManagement/solutions/.test/nonms/dependencies.bicep index 41375545a2..8933ed596e 100644 --- a/modules/Microsoft.OperationsManagement/solutions/.test/nonms/dependencies.bicep +++ b/modules/Microsoft.OperationsManagement/solutions/.test/nonms/dependencies.bicep @@ -9,5 +9,5 @@ resource logAnalytics 'Microsoft.OperationalInsights/workspaces@2021-06-01' = { location: location } -@description('The resource ID of the created Log Analytics Workspace.') -output logAnalyticsResourceId string = logAnalytics.id +@description('The name of the created Log Analytics Workspace.') +output logAnalyticsName string = logAnalytics.name diff --git a/modules/Microsoft.OperationsManagement/solutions/.test/nonms/deploy.test.bicep b/modules/Microsoft.OperationsManagement/solutions/.test/nonms/deploy.test.bicep index 99252b37f2..c3970cb600 100644 --- a/modules/Microsoft.OperationsManagement/solutions/.test/nonms/deploy.test.bicep +++ b/modules/Microsoft.OperationsManagement/solutions/.test/nonms/deploy.test.bicep @@ -41,7 +41,7 @@ module testDeployment '../../deploy.bicep' = { name: '${uniqueString(deployment().name)}-test-${serviceShort}' params: { name: '<>${serviceShort}001' - logAnalyticsWorkspaceName: last(split(resourceGroupResources.outputs.logAnalyticsResourceId, '/')) + logAnalyticsWorkspaceName: resourceGroupResources.outputs.logAnalyticsName product: 'nonmsTestSolutionProduct' publisher: 'nonmsTestSolutionPublisher' } From f2009abc42b986175ee8ed99d76c005d115e1196 Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Fri, 4 Nov 2022 17:45:45 +0100 Subject: [PATCH 08/13] Update modules/Microsoft.OperationsManagement/solutions/.test/min/dependencies.bicep Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com> --- .../solutions/.test/min/dependencies.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.OperationsManagement/solutions/.test/min/dependencies.bicep b/modules/Microsoft.OperationsManagement/solutions/.test/min/dependencies.bicep index 8933ed596e..ef3592fb5f 100644 --- a/modules/Microsoft.OperationsManagement/solutions/.test/min/dependencies.bicep +++ b/modules/Microsoft.OperationsManagement/solutions/.test/min/dependencies.bicep @@ -10,4 +10,4 @@ resource logAnalytics 'Microsoft.OperationalInsights/workspaces@2021-06-01' = { } @description('The name of the created Log Analytics Workspace.') -output logAnalyticsName string = logAnalytics.name +output logAnalyticsWorkspaceName string = logAnalytics.name From d5cb1c2c43c91c8b236f91e08e38d774b4691c5b Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Fri, 4 Nov 2022 17:45:52 +0100 Subject: [PATCH 09/13] Update modules/Microsoft.OperationsManagement/solutions/.test/min/deploy.test.bicep Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com> --- .../solutions/.test/min/deploy.test.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.OperationsManagement/solutions/.test/min/deploy.test.bicep b/modules/Microsoft.OperationsManagement/solutions/.test/min/deploy.test.bicep index 21b2c71224..aa5bfd239b 100644 --- a/modules/Microsoft.OperationsManagement/solutions/.test/min/deploy.test.bicep +++ b/modules/Microsoft.OperationsManagement/solutions/.test/min/deploy.test.bicep @@ -41,6 +41,6 @@ module testDeployment '../../deploy.bicep' = { name: '${uniqueString(deployment().name)}-test-${serviceShort}' params: { name: 'Updates' - logAnalyticsWorkspaceName: resourceGroupResources.outputs.logAnalyticsName + logAnalyticsWorkspaceName: resourceGroupResources.outputs.logAnalyticsWorkspaceName } } From 60b809238a05dca86f4bc94683d1d26e847ef055 Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Fri, 4 Nov 2022 17:45:59 +0100 Subject: [PATCH 10/13] Update modules/Microsoft.OperationsManagement/solutions/.test/ms/deploy.test.bicep Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com> --- .../solutions/.test/ms/deploy.test.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.OperationsManagement/solutions/.test/ms/deploy.test.bicep b/modules/Microsoft.OperationsManagement/solutions/.test/ms/deploy.test.bicep index 7a6b6c2ab8..2afd1ce7dd 100644 --- a/modules/Microsoft.OperationsManagement/solutions/.test/ms/deploy.test.bicep +++ b/modules/Microsoft.OperationsManagement/solutions/.test/ms/deploy.test.bicep @@ -41,7 +41,7 @@ module testDeployment '../../deploy.bicep' = { name: '${uniqueString(deployment().name)}-test-${serviceShort}' params: { name: 'AzureAutomation' - logAnalyticsWorkspaceName: resourceGroupResources.outputs.logAnalyticsName + logAnalyticsWorkspaceName: resourceGroupResources.outputs.logAnalyticsWorkspaceName product: 'OMSGallery' publisher: 'Microsoft' } From 91ac23be9a6dd02b09fc892e76731bf51ce176d3 Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Fri, 4 Nov 2022 17:46:06 +0100 Subject: [PATCH 11/13] Update modules/Microsoft.OperationsManagement/solutions/.test/ms/dependencies.bicep Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com> --- .../solutions/.test/ms/dependencies.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.OperationsManagement/solutions/.test/ms/dependencies.bicep b/modules/Microsoft.OperationsManagement/solutions/.test/ms/dependencies.bicep index 8933ed596e..ef3592fb5f 100644 --- a/modules/Microsoft.OperationsManagement/solutions/.test/ms/dependencies.bicep +++ b/modules/Microsoft.OperationsManagement/solutions/.test/ms/dependencies.bicep @@ -10,4 +10,4 @@ resource logAnalytics 'Microsoft.OperationalInsights/workspaces@2021-06-01' = { } @description('The name of the created Log Analytics Workspace.') -output logAnalyticsName string = logAnalytics.name +output logAnalyticsWorkspaceName string = logAnalytics.name From 5cdc0f8c1e2b2d24a0b9874a73fab7f7a27282dd Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Fri, 4 Nov 2022 17:46:14 +0100 Subject: [PATCH 12/13] Update modules/Microsoft.OperationsManagement/solutions/.test/nonms/dependencies.bicep Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com> --- .../solutions/.test/nonms/dependencies.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.OperationsManagement/solutions/.test/nonms/dependencies.bicep b/modules/Microsoft.OperationsManagement/solutions/.test/nonms/dependencies.bicep index 8933ed596e..ef3592fb5f 100644 --- a/modules/Microsoft.OperationsManagement/solutions/.test/nonms/dependencies.bicep +++ b/modules/Microsoft.OperationsManagement/solutions/.test/nonms/dependencies.bicep @@ -10,4 +10,4 @@ resource logAnalytics 'Microsoft.OperationalInsights/workspaces@2021-06-01' = { } @description('The name of the created Log Analytics Workspace.') -output logAnalyticsName string = logAnalytics.name +output logAnalyticsWorkspaceName string = logAnalytics.name From f4fc04725f420cf928514fce9723195b0a0b3752 Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Fri, 4 Nov 2022 17:46:21 +0100 Subject: [PATCH 13/13] Update modules/Microsoft.OperationsManagement/solutions/.test/nonms/deploy.test.bicep Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com> --- .../solutions/.test/nonms/deploy.test.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.OperationsManagement/solutions/.test/nonms/deploy.test.bicep b/modules/Microsoft.OperationsManagement/solutions/.test/nonms/deploy.test.bicep index c3970cb600..9799d911c6 100644 --- a/modules/Microsoft.OperationsManagement/solutions/.test/nonms/deploy.test.bicep +++ b/modules/Microsoft.OperationsManagement/solutions/.test/nonms/deploy.test.bicep @@ -41,7 +41,7 @@ module testDeployment '../../deploy.bicep' = { name: '${uniqueString(deployment().name)}-test-${serviceShort}' params: { name: '<>${serviceShort}001' - logAnalyticsWorkspaceName: resourceGroupResources.outputs.logAnalyticsName + logAnalyticsWorkspaceName: resourceGroupResources.outputs.logAnalyticsWorkspaceName product: 'nonmsTestSolutionProduct' publisher: 'nonmsTestSolutionPublisher' }