azure-nsg-located-in-subnet

explicit azure emits LocatedIn

match (record)

{ "field": "properties.subnets[*].id", "resource_type": "Microsoft.Network/networkSecurityGroups" }

emit

source typeFirewall
target typeNetwork
source<NSG Firewall node>
target<Subnet node (Network class) referenced by properties.subnets[*].id>

Narrative

NSG {nsg.name} is associated with (located in) subnet {subnet.name}.

Raw rule rules/explicit/azure-nsg.yaml

id: azure-nsg-located-in-subnet
emits: LocatedIn
applies_to:
- azure
match_record:
  resource_type: Microsoft.Network/networkSecurityGroups
  field: properties.subnets[*].id
emit:
  source_type: Firewall
  target_type: Network
  source: <NSG Firewall node>
  target: <Subnet node (Network class) referenced by properties.subnets[*].id>
  api_source: ARM GET /networkSecurityGroups/{name} or az network nsg show
  evidence_field: properties.subnets[*].id
  narrative: NSG {nsg.name} is associated with (located in) subnet {subnet.name}.
move · open · esc close