Azure / Azure/azure-quickstart-templates
The runbooks won't pull logs from multiple subscriptions
- Dominant language
- Bicep
- Stars
- 14.9k
- Forks
- 16.2k
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 6
Description
AzureSAIngestionLogs-MS-Mgmt-SA
AzureSAIngestionMetrics-MS-Mgmt-SA
These runbooks won't actually pull logs from the other subscriptions associated. It'll create the extra runbook jobs with the subscription ID filter but it won't actually select those subscriptions.
I fixed this with this powershell:
"Selecting Azure subscription..."
$SelectedAzureSub = Select-AzureRmSubscription -SubscriptionId $ArmConn.SubscriptionId -TenantId $ArmConn.tenantid
#Creating headers for REST ARM Interface
$subscriptionid=$ArmConn.SubscriptionId
#fix runbook to handle other subscriptions
IF ($SubscriptionidFilter -and $collectionFromAllSubscriptions -eq $false) {
$SubscriptionId = $SubscriptionidFilter
}
write-output "Subscription ID = $subscriptionId"
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the AzureSAIngestionLogs-MS-Mgmt-SA and AzureSAIngestionMetrics-MS-Mgmt-SA runbooks and trace how SubscriptionIdFilter is used after Select-AzureRmSubscription. Reproduce a run with multiple subscriptions and verify that the selected subscription ID is used for the REST ARM request and corresponding runbook jobs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, powershell
- Domain
- cloud, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100