Control: Ensure VM disks for critical VMs are encrypted with Customer-Supplied Encryption Keys (CSEK)
Description
Customer-Supplied Encryption Keys (CSEK) are a feature in Google Cloud Storage and Google Compute Engine. If you supply your own encryption keys, Google uses your key to protect the Google-generated keys used to encrypt and decrypt your data. By default, Google Compute Engine encrypts all data at rest. Compute Engine handles and manages this encryption for you without any additional actions on your part. However, if you wanted to control and manage this encryption yourself, you can provide your own encryption keys.
Usage
Run the control in your terminal:
powerpipe control run terraform_gcp_compliance.control.compute_disk_encrypted_with_cskSnapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run terraform_gcp_compliance.control.compute_disk_encrypted_with_csk --shareSQL
This control uses a named query:
select  address as resource,  case    when (attributes_std -> 'disk_encryption_key') is null then 'alarm'    else 'ok'  end status,  split_part(address, '.', 2) || case    when (attributes_std -> 'disk_encryption_key') is null then 'not encrypted with Customer Supplied Key'    else ' encrypted with Customer Supplied Key'  end || '.' reason  , path || ':' || start_linefrom  terraform_resourcewhere  type = 'google_compute_disk';