From 6faf58c946bfb022f5bce12fc7fef355be63323c Mon Sep 17 00:00:00 2001 From: Sacha Narinx Date: Fri, 29 Nov 2024 22:18:48 +0400 Subject: [PATCH] . --- eslzArm/prerequisites/deployPrerequisites.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eslzArm/prerequisites/deployPrerequisites.json b/eslzArm/prerequisites/deployPrerequisites.json index 7b4083ff1..a0638d4a4 100644 --- a/eslzArm/prerequisites/deployPrerequisites.json +++ b/eslzArm/prerequisites/deployPrerequisites.json @@ -153,6 +153,9 @@ $eslzRootName ) + #One initial call to register the provider for good measure + Invoke-AzRestMethod -Method POST -Uri \"https://management.azure.com/providers/Microsoft.Management/managementGroups/$eslzRootName/providers/Microsoft.Network/register?api-version=2021-04-01\" + #Sleep for XX minutes to wait for Management Groups to load to cache before assignments Start-Sleep -Duration (New-TimeSpan -Minutes 10) @@ -163,7 +166,7 @@ $result = Invoke-AzRestMethod -Method POST -Uri \"https://management.azure.com/providers/Microsoft.Management/managementGroups/$eslzRootName/providers/Microsoft.Network/register?api-version=2021-04-01\" $count++ Start-Sleep -Seconds 30 - Write-Output 'Status Code: ' $result.StatusCode ' Count: ' $count + #Write-Output 'Status Code: ' $result.StatusCode ' Count: ' $count } while ($result.StatusCode -ne 200 -and $count -lt 10) " },