turbot/oci_thrifty
Loading controls...

Control: Old block volume backups should be deleted if not required

Description

Old backups are likely unneeded and costly to maintain.

Usage

Run the control in your terminal:

powerpipe control run oci_thrifty.control.block_volume_backup_max_age

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run oci_thrifty.control.block_volume_backup_max_age --share

Steampipe Tables

Params

ArgsNameDefaultDescriptionVariable
$1block_volume_backup_age_max_days
90
The maximum number of days volume backups can be retained.

SQL

select
a.id as resource,
case
when extract(
day
from
current_timestamp - a.time_created
) < $1 then 'ok'
else 'alarm'
end as status,
a.display_name || ' created ' || to_char(a.time_created, 'DD-Mon-YYYY') || ' (' || extract(
day
from
current_timestamp - a.time_created
) || ' days).' as reason,
coalesce(c.name, 'root') as compartment,
a.region
from
oci_core_volume_backup as a
left join oci_identity_compartment as c on c.id = a.compartment_id;

Tags