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
3 changes: 1 addition & 2 deletions .github/workflows/ms.operationsmanagement.solutions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}'
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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 name of the created Log Analytics Workspace.')
output logAnalyticsWorkspaceName string = logAnalytics.name
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
targetScope = 'subscription'

// ========== //
// Parameters //
// ========== //
@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.')
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-<<namePrefix>>-law-${serviceShort}'
}
}

// ============== //
// Test Execution //
// ============== //

module testDeployment '../../deploy.bicep' = {
scope: resourceGroup
name: '${uniqueString(deployment().name)}-test-${serviceShort}'
params: {
name: 'Updates'
logAnalyticsWorkspaceName: resourceGroupResources.outputs.logAnalyticsWorkspaceName
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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 name of the created Log Analytics Workspace.')
output logAnalyticsWorkspaceName string = logAnalytics.name
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
targetScope = 'subscription'

// ========== //
// Parameters //
// ========== //
@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.')
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-<<namePrefix>>-law-${serviceShort}'
}
}

// ============== //
// Test Execution //
// ============== //

module testDeployment '../../deploy.bicep' = {
scope: resourceGroup
name: '${uniqueString(deployment().name)}-test-${serviceShort}'
params: {
name: 'AzureAutomation'
logAnalyticsWorkspaceName: resourceGroupResources.outputs.logAnalyticsWorkspaceName
product: 'OMSGallery'
publisher: 'Microsoft'
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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 name of the created Log Analytics Workspace.')
output logAnalyticsWorkspaceName string = logAnalytics.name
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
targetScope = 'subscription'

// ========== //
// Parameters //
// ========== //
@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.')
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-<<namePrefix>>-law-${serviceShort}'
}
}

// ============== //
// Test Execution //
// ============== //

module testDeployment '../../deploy.bicep' = {
scope: resourceGroup
name: '${uniqueString(deployment().name)}-test-${serviceShort}'
params: {
name: '<<namePrefix>>${serviceShort}001'
logAnalyticsWorkspaceName: resourceGroupResources.outputs.logAnalyticsWorkspaceName
product: 'nonmsTestSolutionProduct'
publisher: 'nonmsTestSolutionPublisher'
}
}
22 changes: 11 additions & 11 deletions modules/Microsoft.OperationsManagement/solutions/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ 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-<<namePrefix>>-az-law-sol-001'
logAnalyticsWorkspaceName: '<logAnalyticsWorkspaceName>'
name: 'Updates'
}
}
Expand All @@ -86,7 +86,7 @@ module solutions './Microsoft.OperationsManagement/solutions/deploy.bicep' = {
"parameters": {
// Required parameters
"logAnalyticsWorkspaceName": {
"value": "adp-<<namePrefix>>-az-law-sol-001"
"value": "<logAnalyticsWorkspaceName>"
},
"name": {
"value": "Updates"
Expand All @@ -106,10 +106,10 @@ 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-<<namePrefix>>-az-law-sol-001'
logAnalyticsWorkspaceName: '<logAnalyticsWorkspaceName>'
name: 'AzureAutomation'
// Non-required parameters
product: 'OMSGallery'
Expand All @@ -132,7 +132,7 @@ module solutions './Microsoft.OperationsManagement/solutions/deploy.bicep' = {
"parameters": {
// Required parameters
"logAnalyticsWorkspaceName": {
"value": "adp-<<namePrefix>>-az-law-sol-001"
"value": "<logAnalyticsWorkspaceName>"
},
"name": {
"value": "AzureAutomation"
Expand All @@ -159,11 +159,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-<<namePrefix>>-az-law-sol-001'
name: 'nonmsTestSolution'
logAnalyticsWorkspaceName: '<logAnalyticsWorkspaceName>'
name: '<<namePrefix>>omsnonms001'
// Non-required parameters
product: 'nonmsTestSolutionProduct'
publisher: 'nonmsTestSolutionPublisher'
Expand All @@ -185,10 +185,10 @@ module solutions './Microsoft.OperationsManagement/solutions/deploy.bicep' = {
"parameters": {
// Required parameters
"logAnalyticsWorkspaceName": {
"value": "adp-<<namePrefix>>-az-law-sol-001"
"value": "<logAnalyticsWorkspaceName>"
},
"name": {
"value": "nonmsTestSolution"
"value": "<<namePrefix>>omsnonms001"
},
// Non-required parameters
"product": {
Expand Down