turbot/azure_insights

Query: cosmosdb_account_private_link_disabled_count

Usage

powerpipe query azure_insights.query.cosmosdb_account_private_link_disabled_count

Steampipe Tables

SQL

with private_link_enabled as (
select
distinct s.id
from
azure_cosmosdb_account 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
from
azure_cosmosdb_account as s
left join private_link_enabled as va on s.id = va.id
)
select
count(*) as value,
'Private Link Disabled' as label,
case count(*) when 0 then 'ok' else 'alert' end as "type"
from
private_link_status
where
private_link = 'disabled';

Dashboards

The query is used in the dashboards: