azure-vnet-peering-record
match (record)
{
"field": "properties",
"resource_type": "Microsoft.Network/virtualNetworks/virtualNetworkPeerings"
}
where
properties.peeringState == 'Connected'
properties.allowVirtualNetworkAccess == true (default true)
emit
| source type | VirtualNetwork |
|---|---|
| target type | VirtualNetwork |
| source | <local VNet> |
| target | <properties.remoteVirtualNetwork.id resolved to VNet node> |
Narrative
{localVNet.name} is peered with {remoteVNet.name} (peeringState: Connected).
Raw rule rules/explicit/azure-vnet.yaml
id: azure-vnet-peering-record
emits: PeeredWith
applies_to:
- azure
match_record:
resource_type: Microsoft.Network/virtualNetworks/virtualNetworkPeerings
field: properties
where:
- properties.peeringState == 'Connected'
- properties.allowVirtualNetworkAccess == true (default true)
emit:
source_type: VirtualNetwork
target_type: VirtualNetwork
source: <local VNet>
target: <properties.remoteVirtualNetwork.id resolved to VNet node>
api_source: Microsoft.Network/virtualNetworks/virtualNetworkPeerings GET
evidence_field: properties.peeringState + properties.remoteVirtualNetwork.id
narrative: '{localVNet.name} is peered with {remoteVNet.name} (peeringState: Connected).'