Control: OS and data disks should be encrypted with a customer-managed key
Description
Use customer-managed keys to manage the encryption at rest of the contents of your managed disks. By default, the data is encrypted at rest with platform-managed keys, but customer-managed keys are commonly required to meet regulatory compliance standards. Customer-managed keys enable the data to be encrypted with an Azure Key Vault key created and owned by you. You have full control and responsibility for the key lifecycle, including rotation and management. Learn more at https://aka.ms/disks-cmk.
Usage
Run the control in your terminal:
powerpipe control run azure_compliance.control.compute_os_and_data_disk_encrypted_with_cmk
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run azure_compliance.control.compute_os_and_data_disk_encrypted_with_cmk --share
SQL
This control uses a named query:
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 subscriptionfrom azure_compute_disk disk, azure_subscription subwhere disk_state = 'Attached' and sub.subscription_id = disk.subscription_id;