turbot/terraform_aws_compliance

Query: lambda_function_environment_encryption_enabled

Usage

powerpipe query terraform_aws_compliance.query.lambda_function_environment_encryption_enabled

Steampipe Tables

SQL

select
address as resource,
case
when (attributes_std -> 'environment') is not null and (attributes_std -> 'kms_key_arn') is not null then 'ok'
when (attributes_std -> 'environment') is not null and (attributes_std -> 'kms_key_arn') is null then 'alarm'
when (attributes_std -> 'environment') is null and (attributes_std -> 'kms_key_arn') is null then 'skip'
else 'alarm'
end as status,
split_part(address, '.', 2) || case
when (attributes_std -> 'environment') is not null and (attributes_std -> 'kms_key_arn') is not null then ' environment encryption enabled'
when (attributes_std -> 'environment') is not null and (attributes_std -> 'kms_key_arn') is null then ' environment encryption disabled'
when (attributes_std -> 'environment') is null and (attributes_std -> 'kms_key_arn') is null then ' no environment exists'
else ' encryption is enabled even though no environment exists'
end || '.' as reason
, path || ':' || start_line
from
terraform_resource
where
type = 'aws_lambda_function';

Controls

The query is being used by the following controls: