turbot/terraform_aws_compliance

Query: s3_bucket_versioning_enabled

Usage

powerpipe query terraform_aws_compliance.query.s3_bucket_versioning_enabled

Steampipe Tables

SQL

select
address as resource,
case
when coalesce(trim(lower(attributes_std -> 'versioning' ->> 'enabled')), '') in ('true', 'false') and (attributes_std -> 'versioning' -> 'enabled')::bool
then 'ok'
else 'alarm'
end status,
split_part(address, '.', 2) || case
when coalesce(trim(lower(attributes_std -> 'versioning' ->> 'enabled')), '') not in ('true', 'false') then ' versioning disabled'
when (attributes_std -> 'versioning' ->> 'enabled')::bool then ' versioning enabled'
else ' versioning disabled'
end || '.' as reason
, path || ':' || start_line
from
terraform_resource
where
type = 'aws_s3_bucket';

Controls

The query is being used by the following controls: