Control: Azure Synapse workspaces should use customer-managed keys to encrypt data at rest
Description
Use customer-managed keys to control the encryption at rest of the data stored in Azure Synapse workspaces. Customer-managed keys deliver double encryption by adding a second layer of encryption on top of the default encryption with service-managed keys.
Usage
Run the control in your terminal:
powerpipe control run terraform_azure_compliance.control.synapse_workspace_encryption_at_rest_using_cmk
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run terraform_azure_compliance.control.synapse_workspace_encryption_at_rest_using_cmk --share
SQL
This control uses a named query:
select address as resource, case when (attributes_std -> 'customer_managed_key') is null then 'alarm' when (attributes_std -> 'customer_managed_key' -> 'key_versionless_id') is not null then 'ok' else 'alarm' end status, split_part(address, '.', 2) || case when (attributes_std -> 'customer_managed_key') is null then ' ''customer_managed_key'' not defined' when (attributes_std -> 'customer_managed_key' -> 'key_versionless_id') is not null then ' encrypted with CMK' else ' not encrypted with CMK' end || '.' reason , path || ':' || start_linefrom terraform_resourcewhere type = 'azurerm_synapse_workspace';