turbot/steampipe-mod-azure-compliance

Query: databricks_workspace_uses_private_endpoint

Usage

powerpipe query azure_compliance.query.databricks_workspace_uses_private_endpoint

SQL

with databricks_workspace_connection as (
select
distinct a.id
from
azure_databricks_workspace as a,
jsonb_array_elements(private_endpoint_connections) as connection
where
connection -> 'properties' -> 'privateLinkServiceConnectionState' ->> 'status' = 'Approved'
)
select
a.id as resource,
case
when c.id is null then 'alarm'
else 'ok'
end as status,
case
when c.id is null then a.title || ' does not use private endpoint.'
else a.title || ' uses private endpoint.'
end as reason
, a.resource_group as resource_group
, sub.display_name as subscription
from
azure_databricks_workspace as a
left join databricks_workspace_connection as c on c.id = a.id
left join azure_subscription sub on a.subscription_id = sub.subscription_id;

Controls

The query is being used by the following controls: