Open mejdm5 opened 10 months ago
Developing powershell scripts to do the following things:
#region gather all subscription details from table storage
$resourceGroup = "masvc-lighthouseAutomation-rg"
$storageAccountName = "masvclighthousetables001"
$tableName = "azMSPClients"
$storageAccount = Get-AzStorageAccount -ResourceGroupName $resourceGroup -Name $storageAccountName
$ctx = $storageAccount.Context
$cloudTable = (Get-AzStorageTable -Name $tableName -Context $ctx).CloudTable
$partitionKey1 = "azMSPSubscriptions1"
# Get current subscriptions stored in Table
$currentSubscriptions = Get-AzTableRow `
-table $cloudTable `
-CustomFilter "(onboarded eq true)"
##endregion
MonitoringOnboarding currently uses bicep to check compliance during policy Deployment and create a remediation task. This is slow around ~15 minutes per subscription. This needs to be it's own workflow or pipeline and removed from the "MonitoringOnboardingStack"