Skip to content

Commit 123f726

Browse files
author
Dany Contreras
committed
updates
1 parent 14bebed commit 123f726

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

workload/arm/deploy-baseline.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"_generator": {
66
"name": "bicep",
77
"version": "0.33.93.31351",
8-
"templateHash": "8447717540439164604"
8+
"templateHash": "806133170511948426"
99
},
1010
"name": "AVD Accelerator - Baseline Deployment",
1111
"description": "AVD Accelerator - Deployment Baseline",
@@ -8681,7 +8681,7 @@
86818681
"_generator": {
86828682
"name": "bicep",
86838683
"version": "0.33.93.31351",
8684-
"templateHash": "13521638278532946523"
8684+
"templateHash": "18306024285956348271"
86858685
},
86868686
"name": "AVD LZA management plane",
86878687
"description": "This module deploys AVD workspace, host pool, application group scaling plan",
@@ -10590,7 +10590,7 @@
1059010590
"value": "[variables('varApplicationGroups')[copyIndex()].applicationGroupType]"
1059110591
},
1059210592
"hostpoolName": {
10593-
"value": "[parameters('hostPoolName')]"
10593+
"value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', format('{0}', parameters('subscriptionId')), format('{0}', parameters('serviceObjectsRgName'))), 'Microsoft.Resources/deployments', format('HostPool-{0}', parameters('time'))), '2022-09-01').outputs.name.value]"
1059410594
},
1059510595
"tags": {
1059610596
"value": "[parameters('tags')]"
@@ -12335,7 +12335,7 @@
1233512335
"hostPoolReferences": {
1233612336
"value": [
1233712337
{
12338-
"hostPoolArmPath": "[format('/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.DesktopVirtualization/hostpools/{2}', parameters('subscriptionId'), parameters('serviceObjectsRgName'), parameters('hostPoolName'))]",
12338+
"hostPoolArmPath": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', format('{0}', parameters('subscriptionId')), format('{0}', parameters('serviceObjectsRgName'))), 'Microsoft.Resources/deployments', format('HostPool-{0}', parameters('time'))), '2022-09-01').outputs.resourceId.value]",
1233912339
"scalingPlanEnabled": true
1234012340
}
1234112341
]
@@ -12677,7 +12677,7 @@
1267712677
}
1267812678
},
1267912679
"dependsOn": [
12680-
"[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', format('{0}', parameters('subscriptionId')), format('{0}', parameters('serviceObjectsRgName'))), 'Microsoft.Resources/deployments', format('Workspace-{0}', parameters('time')))]"
12680+
"[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', format('{0}', parameters('subscriptionId')), format('{0}', parameters('serviceObjectsRgName'))), 'Microsoft.Resources/deployments', format('HostPool-{0}', parameters('time')))]"
1268112681
]
1268212682
}
1268312683
]

workload/bicep/modules/avdManagementPlane/deploy.bicep

+8-6
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ module applicationGroups '../../../../avm/1.0.0/res/desktop-virtualization/appli
276276
friendlyName: applicationGroup.friendlyName
277277
location: applicationGroup.location
278278
applicationGroupType: applicationGroup.applicationGroupType
279-
hostpoolName: hostPoolName
279+
hostpoolName: hostPool.outputs.name
280280
tags: tags
281281
applications: (applicationGroup.applicationGroupType == 'RemoteApp') ? varRAppApplicationGroupsApps : []
282282
roleAssignments: !empty(securityPrincipalId) ? [
@@ -288,7 +288,6 @@ module applicationGroups '../../../../avm/1.0.0/res/desktop-virtualization/appli
288288
diagnosticSettings: varDiagnosticSettings
289289
}
290290
dependsOn: [
291-
hostPool
292291
]
293292
}]
294293

@@ -331,6 +330,12 @@ module workSpace '../../../../avm/1.0.0/res/desktop-virtualization/workspace/mai
331330
]
332331
}
333332

333+
// // call on the host pool
334+
// resource hostPoolGet 'Microsoft.DesktopVirtualization/hostPools@2024-04-03' existing = {
335+
// name: hostPool.outputs.name
336+
// scope: resourceGroup('${subscriptionId}', '${serviceObjectsRgName}')
337+
// }
338+
334339
// Scaling plan.
335340
module scalingPlan '../../../../avm/1.0.0/res/desktop-virtualization/scaling-plan/main.bicep' = if (deployScalingPlan) {
336341
scope: resourceGroup('${subscriptionId}', '${serviceObjectsRgName}')
@@ -344,16 +349,13 @@ module scalingPlan '../../../../avm/1.0.0/res/desktop-virtualization/scaling-pla
344349
schedules: scalingPlanSchedules
345350
hostPoolReferences: [
346351
{
347-
hostPoolArmPath: '/subscriptions/${subscriptionId}/resourceGroups/${serviceObjectsRgName}/providers/Microsoft.DesktopVirtualization/hostpools/${hostPoolName}'
352+
hostPoolArmPath: hostPool.outputs.resourceId
348353
scalingPlanEnabled: true
349354
}
350355
]
351356
tags: tags
352357
diagnosticSettings: varDiagnosticSettings
353358
}
354359
dependsOn: [
355-
// hostPool
356-
// applicationGroups
357-
workSpace
358360
]
359361
}

0 commit comments

Comments
 (0)