turbot/steampipe-mod-azure-compliance

Control: Azure Event Grid domains should use private link

Description

Azure Private Link lets you connect your virtual network to Azure services without a public IP address at the source or destination. The Private Link platform handles the connectivity between the consumer and services over the Azure backbone network. By mapping private endpoints to your Event Grid domain instead of the entire service, you'll also be protected against data leakage risks.

Usage

Run the control in your terminal:

powerpipe control run azure_compliance.control.eventgrid_domain_private_link_used

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run azure_compliance.control.eventgrid_domain_private_link_used --share

SQL

This control uses a named query:

select
a.id as resource,
case
when public_network_access = 'Enabled' then 'alarm'
when private_endpoint_connections is null then 'info'
when private_endpoint_connections @> '[{"privateLinkServiceConnectionStateStatus": "Approved"}]'::jsonb then 'ok'
else 'alarm'
end as status,
case
when public_network_access = 'Enabled' then a.name || ' using public networks.'
when private_endpoint_connections is null then a.name || ' no private link exists.'
when private_endpoint_connections @> '[{"privateLinkServiceConnectionStateStatus": "Approved"}]'::jsonb
then a.name || ' using private link.'
else a.name || ' not using private link.'
end as reason
, a.resource_group as resource_group
, sub.display_name as subscription
from
azure_eventgrid_domain a,
azure_subscription sub;

Tags