turbot/terraform_aws_compliance

Query: efs_file_system_automatic_backups_enabled

Usage

powerpipe query terraform_aws_compliance.query.efs_file_system_automatic_backups_enabled

Steampipe Tables

SQL

select
address as resource,
case
when name in (select split_part((attributes_std ->> 'file_system_id')::text, '.', 2) from terraform_resource where type = 'aws_efs_backup_policy' and (attributes_std -> 'backup_policy' ->> 'status')::text = 'ENABLED') then 'ok' else 'alarm'
end as status,
split_part(address, '.', 2) || case
when name in (select split_part((attributes_std ->> 'file_system_id')::text, '.', 2) from terraform_resource where type = 'aws_efs_backup_policy' and (attributes_std -> 'backup_policy' ->> 'status')::text = 'ENABLED') then ' backup policy enabled'
else ' backup policy disabled'
end || '.' as reason
, path || ':' || start_line
from
terraform_resource
where
type = 'aws_efs_file_system';

Controls

The query is being used by the following controls: