turbot/steampipe-mod-gcp-thrifty

Control: Logging buckets with long retention period should be reviewed

Description

Setting a longer retention period should be reviewed as it impacts billing.

Usage

Run the control in your terminal:

powerpipe control run gcp_thrifty.control.logging_bucket_higher_retention_period

Snapshot and share results via Turbot Pipes:

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

Steampipe Tables

SQL

select
self_link as resource,
case
when retention_days > $1 then 'alarm'
else 'ok'
end as status,
title || ' retention period set to ' || retention_days || ' day(s).' as reason
, location, project
from
gcp_logging_bucket
where
name != '_Required';

Params

ArgsNameDefaultDescriptionVariable
$1logging_bucket_max_retention_days
30
The maximum number of days allowed for bucket log retention period.

Tags