turbot/steampipe-mod-terraform-oci-compliance

Control: Database encryption should be enabled

Description

Ensure databases are encrypted at rest to protect sensitive data.

Usage

Run the control in your terminal:

powerpipe control run terraform_oci_compliance.control.database_db_encryption_enabled

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run terraform_oci_compliance.control.database_db_encryption_enabled --share

SQL

This control uses a named query:

select
address as resource,
case
when coalesce((attributes_std ->> 'kms_key_id'), '') = '' then 'alarm'
else 'ok'
end as status,
split_part(address, '.', 2) || case
when coalesce((attributes_std ->> 'kms_key_id'), '') = '' then ' encryption disabled'
else ' encryption enabled'
end || '.' reason
, path || ':' || start_line
from
terraform_resource
where
type = 'oci_database_database';

Tags