turbot/gcp_thrifty

Control: Buckets should have lifecycle policies

Description

Buckets should have a lifecycle policy associated for data retention.

Usage

Run the control in your terminal:

powerpipe control run gcp_thrifty.control.storage_bucket_without_lifecycle_policy

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run gcp_thrifty.control.storage_bucket_without_lifecycle_policy --share

Steampipe Tables

SQL

select
self_link as resource,
case
when lifecycle_rules is null then 'alarm'
else 'ok'
end as status,
case
when lifecycle_rules is null then name || ' has no lifecycle policy.'
else name || ' has lifecycle policy.'
end as reason
, location, project
from
gcp_storage_bucket;

Tags