From dc6eb88d34f625e0641aa7a8ac14af8f7a88f1e0 Mon Sep 17 00:00:00 2001 From: Anthony Martin <38542602+anthony-c-martin@users.noreply.github.com> Date: Fri, 7 Apr 2023 10:55:29 -0400 Subject: [PATCH] Update managedDisks-customimagevm.json to avoid loops depending on loops --- .../nestedtemplates/managedDisks-customimagevm.json | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ARM-wvd-templates/nestedtemplates/managedDisks-customimagevm.json b/ARM-wvd-templates/nestedtemplates/managedDisks-customimagevm.json index 80518b04..1f774d44 100644 --- a/ARM-wvd-templates/nestedtemplates/managedDisks-customimagevm.json +++ b/ARM-wvd-templates/nestedtemplates/managedDisks-customimagevm.json @@ -498,7 +498,9 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('rdshPrefix'), add(copyindex(), parameters('vmInitialNumber')), '/', 'Microsoft.PowerShell.DSC')]", "location": "[parameters('location')]", - "dependsOn": [ "rdsh-vm-loop" ], + "dependsOn": [ + "[resourceId('Microsoft.Compute/virtualMachines', concat(parameters('rdshPrefix'), add(copyindex(), parameters('vmInitialNumber'))))]" + ], "copy": { "name": "rdsh-dsc-loop", "count": "[parameters('rdshNumberOfInstances')]" @@ -529,7 +531,9 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('rdshPrefix'), add(copyindex(), parameters('vmInitialNumber')), '/', 'AADLoginForWindows')]", "location": "[parameters('location')]", - "dependsOn": [ "rdsh-dsc-loop" ], + "dependsOn": [ + "[resourceId('Microsoft.Compute/virtualMachines/extensions', concat(parameters('rdshPrefix'), add(copyindex(), parameters('vmInitialNumber'))), 'Microsoft.PowerShell.DSC')]" + ], "copy": { "name": "rdsh-aad-join-loop", "count": "[parameters('rdshNumberOfInstances')]" @@ -548,7 +552,9 @@ "type": "Microsoft.Compute/virtualMachines/extensions", "name": "[concat(parameters('rdshPrefix'), add(copyindex(), parameters('vmInitialNumber')), '/', 'joindomain')]", "location": "[parameters('location')]", - "dependsOn": [ "rdsh-dsc-loop" ], + "dependsOn": [ + "[resourceId('Microsoft.Compute/virtualMachines/extensions', concat(parameters('rdshPrefix'), add(copyindex(), parameters('vmInitialNumber'))), 'Microsoft.PowerShell.DSC')]" + ], "copy": { "name": "rdsh-domain-join-loop", "count": "[parameters('rdshNumberOfInstances')]"