From 7aa56d3758fb72cf7aa23c3c9ad6a89b933b6ccd Mon Sep 17 00:00:00 2001 From: Rainer Halanek Date: Fri, 14 Jan 2022 14:37:08 +0100 Subject: [PATCH] fix VM --- .../virtualMachines/.parameters/linux.parameters.json | 3 +++ .../virtualMachines/.parameters/windows.parameters.json | 3 +++ arm/Microsoft.Compute/virtualMachines/deploy.bicep | 2 +- arm/Microsoft.Compute/virtualMachines/readme.md | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/arm/Microsoft.Compute/virtualMachines/.parameters/linux.parameters.json b/arm/Microsoft.Compute/virtualMachines/.parameters/linux.parameters.json index 2c9aa86919..6449cc4eab 100644 --- a/arm/Microsoft.Compute/virtualMachines/.parameters/linux.parameters.json +++ b/arm/Microsoft.Compute/virtualMachines/.parameters/linux.parameters.json @@ -120,6 +120,9 @@ "enabled": true } }, + "monitoringWorkspaceId": { + "value": "/subscriptions/<>/resourcegroups/validation-rg/providers/microsoft.operationalinsights/workspaces/adp-sxx-az-law-x-001" + }, "extensionDependencyAgentConfig": { "value": { "enabled": true diff --git a/arm/Microsoft.Compute/virtualMachines/.parameters/windows.parameters.json b/arm/Microsoft.Compute/virtualMachines/.parameters/windows.parameters.json index 2e2a27cb2e..30d0fc56a0 100644 --- a/arm/Microsoft.Compute/virtualMachines/.parameters/windows.parameters.json +++ b/arm/Microsoft.Compute/virtualMachines/.parameters/windows.parameters.json @@ -137,6 +137,9 @@ "enabled": true } }, + "monitoringWorkspaceId": { + "value": "/subscriptions/<>/resourcegroups/validation-rg/providers/microsoft.operationalinsights/workspaces/adp-sxx-az-law-x-001" + }, "extensionDependencyAgentConfig": { "value": { "enabled": true diff --git a/arm/Microsoft.Compute/virtualMachines/deploy.bicep b/arm/Microsoft.Compute/virtualMachines/deploy.bicep index e97729e07a..fe8080886e 100644 --- a/arm/Microsoft.Compute/virtualMachines/deploy.bicep +++ b/arm/Microsoft.Compute/virtualMachines/deploy.bicep @@ -162,7 +162,7 @@ param extensionMonitoringAgentConfig object = { enabled: false } -@description('Optional. Resource ID of the monitoring log analytics workspace.') +@description('Optional. Resource ID of the monitoring log analytics workspace. Must be set when extensionMonitoringAgentConfig is set to true.') param monitoringWorkspaceId string = '' @description('Optional. The configuration for the [Dependency Agent] extension. Must at least contain the ["enabled": true] property to be executed') diff --git a/arm/Microsoft.Compute/virtualMachines/readme.md b/arm/Microsoft.Compute/virtualMachines/readme.md index 3de2d18d09..2466945ca2 100644 --- a/arm/Microsoft.Compute/virtualMachines/readme.md +++ b/arm/Microsoft.Compute/virtualMachines/readme.md @@ -59,7 +59,7 @@ This module deploys one Virtual Machine with one or multiple nics and optionally | `location` | string | `[resourceGroup().location]` | | Optional. Location for all resources. | | `lock` | string | `NotSpecified` | `[CanNotDelete, NotSpecified, ReadOnly]` | Optional. Specify the type of lock. | | `maxPriceForLowPriorityVm` | string | | | Optional. Specifies the maximum price you are willing to pay for a low priority VM/VMSS. This price is in US Dollars. | -| `monitoringWorkspaceId` | string | | | Optional. Resource ID of the monitoring log analytics workspace. | +| `monitoringWorkspaceId` | string | | | Optional. Resource ID of the monitoring log analytics workspace. Must be set when extensionMonitoringAgentConfig is set to true. | | `name` | string | `[take(toLower(uniqueString(resourceGroup().name)), 10)]` | | Optional. The name of the virtual machine to be created. You should use a unique prefix to reduce name collisions in Active Directory. If no value is provided, a 10 character long unique string will be generated based on the Resource Group's name. | | `nicConfigurations` | array | | | Required. Configures NICs and PIPs. | | `nicMetricsToEnable` | array | `[AllMetrics]` | `[AllMetrics]` | Optional. The name of metrics that will be streamed. |