diff --git a/.azuredevops/modulePipelines/ms.operationsmanagement.solutions.yml b/.azuredevops/modulePipelines/ms.operationsmanagement.solutions.yml index fe230cfca9..5dc2588d47 100644 --- a/.azuredevops/modulePipelines/ms.operationsmanagement.solutions.yml +++ b/.azuredevops/modulePipelines/ms.operationsmanagement.solutions.yml @@ -46,6 +46,7 @@ stages: removeDeployment: '${{ parameters.removeDeployment }}' deploymentBlocks: - path: $(modulePath)/.parameters/min.parameters.json + - path: $(modulePath)/.parameters/nonms.parameters.json - path: $(modulePath)/.parameters/parameters.json - stage: Publishing diff --git a/arm/Microsoft.OperationsManagement/solutions/.parameters/nonms.parameters.json b/arm/Microsoft.OperationsManagement/solutions/.parameters/nonms.parameters.json new file mode 100644 index 0000000000..a040bf8d2f --- /dev/null +++ b/arm/Microsoft.OperationsManagement/solutions/.parameters/nonms.parameters.json @@ -0,0 +1,18 @@ +{ + "$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/arm/Microsoft.OperationsManagement/solutions/deploy.bicep b/arm/Microsoft.OperationsManagement/solutions/deploy.bicep index 6a810b2fb2..3438041ddd 100644 --- a/arm/Microsoft.OperationsManagement/solutions/deploy.bicep +++ b/arm/Microsoft.OperationsManagement/solutions/deploy.bicep @@ -1,4 +1,4 @@ -@description('Required. Name of the solution.') +@description('Required. Name of the solution. For Microsoft published gallery solution the target solution resource name will be composed as `{name}({logAnalyticsWorkspaceName})`.') param name string @description('Required. Name of the Log Analytics workspace where the solution will be deployed/enabled.') @@ -7,10 +7,10 @@ param logAnalyticsWorkspaceName string @description('Optional. Location for all resources.') param location string = resourceGroup().location -@description('Optional. The product of the deployed solution. For Microsoft published gallery solution it should be OMSGallery. This is case sensitive.') +@description('Optional. The product of the deployed solution. For Microsoft published gallery solution it should be `OMSGallery` and the target solution resource product will be composed as `OMSGallery/{name}`. For third party solution, it can be anything. This is case sensitive.') param product string = 'OMSGallery' -@description('Optional. The publisher name of the deployed solution. For gallery solution, it is Microsoft.') +@description('Optional. The publisher name of the deployed solution. For Microsoft published gallery solution, it is `Microsoft`.') param publisher string = 'Microsoft' @description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).') @@ -32,7 +32,9 @@ resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2020-08 name: logAnalyticsWorkspaceName } -var solutionName = '${name}(${logAnalyticsWorkspace.name})' +var solutionName = publisher == 'Microsoft' ? '${name}(${logAnalyticsWorkspace.name})' : name + +var solutionProduct = publisher == 'Microsoft' ? 'OMSGallery/${name}' : product resource solution 'Microsoft.OperationsManagement/solutions@2015-11-01-preview' = { name: solutionName @@ -43,7 +45,7 @@ resource solution 'Microsoft.OperationsManagement/solutions@2015-11-01-preview' plan: { name: solutionName promotionCode: '' - product: '${product}/${name}' + product: solutionProduct publisher: publisher } } diff --git a/arm/Microsoft.OperationsManagement/solutions/readme.md b/arm/Microsoft.OperationsManagement/solutions/readme.md index e811889681..9ab3a6f332 100644 --- a/arm/Microsoft.OperationsManagement/solutions/readme.md +++ b/arm/Microsoft.OperationsManagement/solutions/readme.md @@ -21,15 +21,15 @@ This module deploys OperationsManagement Solutions. | Parameter Name | Type | Description | | :-- | :-- | :-- | | `logAnalyticsWorkspaceName` | string | Name of the Log Analytics workspace where the solution will be deployed/enabled. | -| `name` | string | Name of the solution. | +| `name` | string | Name of the solution. For Microsoft published gallery solution the target solution resource name will be composed as `{name}({logAnalyticsWorkspaceName})`. | **Optional parameters** | Parameter Name | Type | Default Value | Description | | :-- | :-- | :-- | :-- | | `enableDefaultTelemetry` | bool | `True` | Enable telemetry via the Customer Usage Attribution ID (GUID). | | `location` | string | `[resourceGroup().location]` | Location for all resources. | -| `product` | string | `'OMSGallery'` | The product of the deployed solution. For Microsoft published gallery solution it should be OMSGallery. This is case sensitive. | -| `publisher` | string | `'Microsoft'` | The publisher name of the deployed solution. For gallery solution, it is Microsoft. | +| `product` | string | `'OMSGallery'` | The product of the deployed solution. For Microsoft published gallery solution it should be `OMSGallery` and the target solution resource product will be composed as `OMSGallery/{name}`. For third party solution, it can be anything. This is case sensitive. | +| `publisher` | string | `'Microsoft'` | The publisher name of the deployed solution. For Microsoft published gallery solution, it is `Microsoft`. | ## Outputs @@ -89,6 +89,54 @@ module solutions './Microsoft.OperationsManagement/solutions/deploy.bicep' = { via JSON Parameter file +```json +{ + "$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" + } + } +} + +``` + + + +
+ +via Bicep module + +```bicep +module solutions './Microsoft.OperationsManagement/solutions/deploy.bicep' = { + name: '${uniqueString(deployment().name)}-solutions' + params: { + name: 'nonmsTestSolution' + logAnalyticsWorkspaceName: 'adp-<>-az-law-sol-001' + product: 'nonmsTestSolutionProduct' + publisher: 'nonmsTestSolutionPublisher' + } +``` + +
+

+ +

Example 3

+ +
+ +via JSON Parameter file + ```json { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", diff --git a/settings.json b/settings.json index 9198a0f7d0..6146e07c81 100644 --- a/settings.json +++ b/settings.json @@ -5,7 +5,7 @@ "localTokens": [ { "name": "namePrefix", - "value": "carml", + "value": "rke", "metadata": { "description": "A 3-5 character length string, included in the resources names" }