Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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-<<namePrefix>>-az-law-sol-001"
},
"product": {
"value": "nonmsTestSolutionProduct"
},
"publisher": {
"value": "nonmsTestSolutionPublisher"
}
}
}
12 changes: 7 additions & 5 deletions arm/Microsoft.OperationsManagement/solutions/deploy.bicep
Original file line number Diff line number Diff line change
@@ -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.')
Expand All @@ -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).')
Expand All @@ -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
Expand All @@ -43,7 +45,7 @@ resource solution 'Microsoft.OperationsManagement/solutions@2015-11-01-preview'
plan: {
name: solutionName
promotionCode: ''
product: '${product}/${name}'
product: solutionProduct
publisher: publisher
}
}
Expand Down
54 changes: 51 additions & 3 deletions arm/Microsoft.OperationsManagement/solutions/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -89,6 +89,54 @@ module solutions './Microsoft.OperationsManagement/solutions/deploy.bicep' = {

<summary>via JSON Parameter file</summary>

```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-<<namePrefix>>-az-law-sol-001"
},
"product": {
"value": "nonmsTestSolutionProduct"
},
"publisher": {
"value": "nonmsTestSolutionPublisher"
}
}
}

```

</details>

<details>

<summary>via Bicep module</summary>

```bicep
module solutions './Microsoft.OperationsManagement/solutions/deploy.bicep' = {
name: '${uniqueString(deployment().name)}-solutions'
params: {
name: 'nonmsTestSolution'
logAnalyticsWorkspaceName: 'adp-<<namePrefix>>-az-law-sol-001'
product: 'nonmsTestSolutionProduct'
publisher: 'nonmsTestSolutionPublisher'
}
```

</details>
<p>

<h3>Example 3</h3>

<details>

<summary>via JSON Parameter file</summary>

```json
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
Expand Down
2 changes: 1 addition & 1 deletion settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"localTokens": [
{
"name": "namePrefix",
"value": "carml",
"value": "rke",
"metadata": {
"description": "A 3-5 character length string, included in the resources names"
}
Expand Down