turbot/azure_insights

Query: sql_server_encryption_report

Usage

powerpipe query azure_insights.query.sql_server_encryption_report

SQL

with encryption_protector as (
select
id,
ep ->> 'kind' as kind,
ep ->> 'serverKeyName' as serverKeyName,
ep ->> 'serverKeyType' as serverKeyType
from
azure_sql_server,
jsonb_array_elements(encryption_protector) as ep
)
select
s.name as "Name",
e.kind as "Kind",
e.serverKeyName as "Server Key Name",
e.serverKeyType as "Server Key Type",
sub.title as "Subscription",
s.subscription_id as "Subscription ID",
s.resource_group as "Resource Group",
s.region as "Region",
s.id as "ID"
from
azure_sql_server as s left join encryption_protector as e on s.id = e.id,
azure_subscription as sub
where
sub.subscription_id = s.subscription_id;

Dashboards

The query is used in the dashboards: