turbot/azure_compliance

Query: sql_server_tde_protector_cmk_encrypted

Usage

powerpipe query azure_compliance.query.sql_server_tde_protector_cmk_encrypted

SQL

select
s.id as resource,
case
when encryption ->> 'kind' = 'servicemanaged' then 'alarm'
else 'ok'
end as status,
case
when encryption ->> 'kind' = 'servicemanaged' then s.name || ' TDE protector not encrypted with CMK.'
else s.name || ' TDE protector encrypted with CMK.'
end as reason
, s.resource_group as resource_group
, sub.display_name as subscription
from
azure_sql_server s,
jsonb_array_elements(encryption_protector) encryption,
azure_subscription sub
where
sub.subscription_id = s.subscription_id;

Controls

The query is being used by the following controls: