turbot/azure_compliance

Query: compute_os_and_data_disk_encrypted_with_cmk

Usage

powerpipe query azure_compliance.query.compute_os_and_data_disk_encrypted_with_cmk

SQL

select
disk.id as resource,
case
when encryption_type = 'EncryptionAtRestWithCustomerKey' then 'ok'
else 'alarm'
end as status,
case
when encryption_type = 'EncryptionAtRestWithCustomerKey' then disk.name || ' encrypted with CMK.'
else disk.name || ' not encrypted with CMK.'
end as reason
, disk.resource_group as resource_group
, sub.display_name as subscription
from
azure_compute_disk disk,
azure_subscription sub
where
disk_state = 'Attached'
and sub.subscription_id = disk.subscription_id;

Controls

The query is being used by the following controls: