Control: Unused private endpoints should be removed
Description
Private endpoints that have no service connections should be reviewed and removed if not needed, as they incur unnecessary costs.
Usage
Run the control in your terminal:
powerpipe control run azure_thrifty.control.network_private_endpoint_unusedSnapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run azure_thrifty.control.network_private_endpoint_unused --shareSteampipe Tables
SQL
select  pe.id as resource,  case    when pe.private_link_service_connections is null then 'alarm'    else 'ok'  end as status,  case    when pe.private_link_service_connections is null then pe.name || ' has no service connections.'    else pe.name || ' has service connections.'  end as reason    , pe.resource_group  , display_name as subscriptionfrom  azure_private_endpoint as pe,  azure_subscription as subwhere  sub.subscription_id = pe.subscription_id;