From f20c8f2025e6c341b5b70fc04a1bd7bb2157bdee Mon Sep 17 00:00:00 2001 From: Dany Contreras <78437433+danycontre@users.noreply.github.com> Date: Mon, 26 Aug 2024 10:58:36 -0500 Subject: [PATCH] updates --- .../deployNewSessionHostsToHostPools.json | 12 ++++++------ .../bicep/brownfield/newSessionHosts/deploy.bicep | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/workload/arm/brownfield/deployNewSessionHostsToHostPools.json b/workload/arm/brownfield/deployNewSessionHostsToHostPools.json index 4b622321f..8521308af 100644 --- a/workload/arm/brownfield/deployNewSessionHostsToHostPools.json +++ b/workload/arm/brownfield/deployNewSessionHostsToHostPools.json @@ -5,7 +5,7 @@ "_generator": { "name": "bicep", "version": "0.29.47.4906", - "templateHash": "5291332406785432023" + "templateHash": "8529136871393216686" } }, "parameters": { @@ -1587,7 +1587,7 @@ "value": "[variables('varTimeZoneSessionHosts')]" }, "zone": "[if(parameters('useAvailabilityZones'), createObject('value', add(mod(range(1, parameters('count'))[copyIndex()], 3), 1)), createObject('value', 0))]", - "managedIdentities": "[if(equals(parameters('identityServiceProvider'), 'EntraID'), createObject('value', createObject('systemAssigned', true())), createObject('value', null()))]", + "managedIdentities": "[if(or(equals(parameters('identityServiceProvider'), 'EntraID'), parameters('deployMonitoring')), createObject('value', createObject('systemAssigned', true())), createObject('value', null()))]", "encryptionAtHost": { "value": "[parameters('diskZeroTrust')]" }, @@ -5527,13 +5527,13 @@ "value": "[format('{0}{1}', variables('varSessionHostNamePrefix'), padLeft(add(range(1, parameters('count'))[copyIndex()], parameters('countIndex')), 4, '0'))]" }, "name": { - "value": "MicrosoftMonitoringAgent" + "value": "AzureMonitorWindowsAgent" }, "publisher": { - "value": "Microsoft.EnterpriseCloud.Monitoring" + "value": "Microsoft.Azure.Monitor" }, "type": { - "value": "MicrosoftMonitoringAgent" + "value": "AzureMonitorWindowsAgent" }, "typeHandlerVersion": { "value": "1.0" @@ -5542,7 +5542,7 @@ "value": true }, "enableAutomaticUpgrade": { - "value": false + "value": true }, "settings": { "value": { diff --git a/workload/bicep/brownfield/newSessionHosts/deploy.bicep b/workload/bicep/brownfield/newSessionHosts/deploy.bicep index 61bae7429..a4d095f53 100644 --- a/workload/bicep/brownfield/newSessionHosts/deploy.bicep +++ b/workload/bicep/brownfield/newSessionHosts/deploy.bicep @@ -308,9 +308,9 @@ module sessionHosts '../../../../avm/1.0.0/res/compute/virtual-machine/main.bice location: location timeZone: varTimeZoneSessionHosts zone: useAvailabilityZones ? (i % 3 + 1) : 0 - managedIdentities: (identityServiceProvider == 'EntraID') ? { + managedIdentities: (identityServiceProvider == 'EntraID' || deployMonitoring) ? { systemAssigned: true - }: null + }: null encryptionAtHost: diskZeroTrust virtualMachineScaleSetResourceId: virtualMachineScaleSetResourceId osType: 'Windows' @@ -417,17 +417,17 @@ module monitoring '../../../../avm/1.0.0/res/compute/virtual-machine/extension/m params: { location: location virtualMachineName: '${varSessionHostNamePrefix}${padLeft((i + countIndex), 4, '0')}' - name: 'MicrosoftMonitoringAgent' - publisher: 'Microsoft.EnterpriseCloud.Monitoring' - type: 'MicrosoftMonitoringAgent' + name: 'AzureMonitorWindowsAgent' + publisher: 'Microsoft.Azure.Monitor' + type: 'AzureMonitorWindowsAgent' typeHandlerVersion: '1.0' autoUpgradeMinorVersion: true - enableAutomaticUpgrade: false + enableAutomaticUpgrade: true settings: { workspaceId: !empty(alaWorkspaceResourceId) ? reference(alaWorkspace.id, alaWorkspace.apiVersion).customerId : '' } protectedSettings: { - workspaceKey: !empty(alaWorkspaceResourceId) ? alaWorkspace.listKeys().primarySharedKey : '' + workspaceKey: !empty(alaWorkspaceResourceId) ? alaWorkspace.listKeys().primarySharedKey : '' } } dependsOn: [