turbot/steampipe-mod-terraform-azure-compliance

Control: Both operating systems and data disks in Azure Kubernetes Service clusters should be encrypted by customer-managed keys

Description

Encrypting OS and data disks using customer-managed keys provides more control and greater flexibility in key management. This is a common requirement in many regulatory and industry compliance standards.

Usage

Run the control in your terminal:

powerpipe control run terraform_azure_compliance.control.kubernetes_cluster_os_and_data_disks_encrypted_with_cmk

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run terraform_azure_compliance.control.kubernetes_cluster_os_and_data_disks_encrypted_with_cmk --share

SQL

This control uses a named query:

select
address as resource,
case
when (attributes_std -> 'disk_encryption_set_id') is null then 'alarm'
else 'ok'
end status,
split_part(address, '.', 2) || case
when (attributes_std -> 'disk_encryption_set_id') is null then ' os and data diska not encrypted with CMK'
else ' os and data diska encrypted with CMK'
end || '.' reason
, path || ':' || start_line
from
terraform_resource
where
type = 'azurerm_kubernetes_cluster';

Tags