turbot/terraform_aws_compliance

Query: secretsmanager_secret_encrypted_with_kms_cmk

Usage

powerpipe query terraform_aws_compliance.query.secretsmanager_secret_encrypted_with_kms_cmk

Steampipe Tables

SQL

select
address as resource,
case
when coalesce(trim((attributes_std ->> 'kms_key_id')), '') = '' or
(attributes_std ->> 'kms_key_id') = 'aws/secretsmanager'
then 'alarm'
else 'ok'
end as status,
split_part(address, '.', 2) || case
when coalesce(trim((attributes_std ->> 'kms_key_id')), '') = '' or
(attributes_std ->> 'kms_key_id') = 'aws/secretsmanager'
then ' is encrypted at rest default KMS key'
else ' is encrypted at rest using KMS CMK'
end || '.' as reason
, path || ':' || start_line
from
terraform_resource
where
type = 'aws_secretsmanager_secret';

Controls

The query is being used by the following controls: