turbot/azure_insights

Query: sql_server_private_link_status

Usage

powerpipe query azure_insights.query.sql_server_private_link_status

Steampipe Tables

SQL

with private_link_enabled as (
select
distinct s.id
from
azure_sql_server as s,
jsonb_array_elements(private_endpoint_connections) as connection
where
connection ->> 'PrivateLinkServiceConnectionStateStatus' = 'Approved'
),
private_link_status as (
select
case
when va.id is not null then 'enabled'
else 'disabled' end as private_link_enabled
from
azure_sql_server as s
left join private_link_enabled as va on s.id = va.id
)
select
private_link_enabled,
count(*)
from
private_link_status
group by
private_link_enabled;

Dashboards

The query is used in the dashboards: