Control: Disk access resources 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 diskAccesses, data leakage risks are reduced.
Usage
Run the control in your terminal:
powerpipe control run azure_compliance.control.compute_disk_access_uses_private_link
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run azure_compliance.control.compute_disk_access_uses_private_link --share
SQL
This control uses a named query:
with compute_disk_connection as ( select distinct a.id from azure_compute_disk_access as a, jsonb_array_elements(private_endpoint_connections) as connection where connection ->> 'PrivateLinkServiceConnectionStateStatus' = 'Approved')select b.id as resource, case when c.id is null then 'alarm' else 'ok' end as status, case when c.id is null then b.name || ' not uses private link.' else b.name || ' uses private link.' end as reason , b.resource_group as resource_group , sub.display_name as subscriptionfrom azure_compute_disk_access as b left join compute_disk_connection as c on b.id = c.id, azure_subscription as subwhere sub.subscription_id = b.subscription_id;