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 loginpowerpipe control run oci_thrifty.control.block_volume_backup_max_age --share
Steampipe Tables
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.regionfrom oci_core_volume_backup as a left join oci_identity_compartment as c on c.id = a.compartment_id;
Params
Args | Name | Default | Description | Variable |
---|---|---|---|---|
$1 | block_volume_backup_age_max_days |
| The maximum number of days volume backups can be retained. |