Skip to content

Commit

Permalink
Merge pull request #654 from Azure/issue-650
Browse files Browse the repository at this point in the history
Fix-issue-650
  • Loading branch information
danycontre authored Aug 26, 2024
2 parents 98515e5 + f20c8f2 commit dfe8d5f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions workload/arm/brownfield/deployNewSessionHostsToHostPools.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"_generator": {
"name": "bicep",
"version": "0.29.47.4906",
"templateHash": "5291332406785432023"
"templateHash": "8529136871393216686"
}
},
"parameters": {
Expand Down Expand Up @@ -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')]"
},
Expand Down Expand Up @@ -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"
Expand All @@ -5542,7 +5542,7 @@
"value": true
},
"enableAutomaticUpgrade": {
"value": false
"value": true
},
"settings": {
"value": {
Expand Down
14 changes: 7 additions & 7 deletions workload/bicep/brownfield/newSessionHosts/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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: [
Expand Down

0 comments on commit dfe8d5f

Please sign in to comment.