Skip to content

Commit de5aa81

Browse files
fix: context issue (#464)
# Pull Request ## Description Fix context issue when no resource groups are present. ## License By submitting this pull request, I confirm that my contribution is made under the terms of the projects associated license.
1 parent 8ce4bc6 commit de5aa81

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/ALZ/Public/Remove-PlatformLandingZone.ps1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,6 +1023,8 @@ function Remove-PlatformLandingZone {
10231023
$funcRemoveDeploymentsForScope = $using:funcRemoveDeploymentsForScope
10241024
${function:Remove-DeploymentsForScope} = $funcRemoveDeploymentsForScope
10251025
$TempLogFileForPlan = $using:TempLogFileForPlan
1026+
$throttleLimit = $using:ThrottleLimit
1027+
$planMode = $using:PlanMode
10261028

10271029
$subscription = $_
10281030
Write-ToConsoleLog "Finding resource groups for subscription: $($subscription.Name) (ID: $($subscription.Id))" -NoNewline
@@ -1060,9 +1062,6 @@ function Remove-PlatformLandingZone {
10601062

10611063
$shouldRetry = $true
10621064

1063-
$throttleLimit = $using:ThrottleLimit
1064-
$planMode = $using:PlanMode
1065-
10661065
while($shouldRetry) {
10671066
$shouldRetry = $false
10681067
$resourceGroupsToRetry = [System.Collections.Concurrent.ConcurrentBag[hashtable]]::new()

0 commit comments

Comments
 (0)