azure-sub-mg-contains-subscription
match (record)
{
"field": "id",
"resource_type": "Microsoft.Management/managementGroups/subscriptions"
}
emit
| source type | AdministrativeBoundary |
|---|---|
| target type | * |
| source | <management group node> |
| target | <subscription node> |
Narrative
{mg.name} contains subscription {subscription.name}.
Raw rule rules/explicit/azure-subscriptions.yaml
id: azure-sub-mg-contains-subscription
emits: Contains
applies_to:
- azure
match_record:
resource_type: Microsoft.Management/managementGroups/subscriptions
field: id
emit:
source_type: AdministrativeBoundary
target_type: '*'
source: <management group node>
target: <subscription node>
api_source: GET /providers/Microsoft.Management/managementGroups/{mg}/descendants
evidence_field: id
note: Emit ONLY if the management-group/org adapter has not already produced this Contains edge; dedupe
on (Contains, mg, subscription). Included so the subscription tier is reachable by hierarchy-chains
descent even when the MG adapter did not run.
narrative: '{mg.name} contains subscription {subscription.name}.'