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:
steampipe check oci_thrifty.control.block_volume_backup_max_age
Snapshot and share results via Steampipe Cloud:
steampipe loginsteampipe check --share oci_thrifty.control.block_volume_backup_max_age
Plugins & Tables
Params
Args | Name | Default | Description | Variable |
---|---|---|---|---|
$1 | block_volume_backup_age_max_days |
| 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.regionfrom oci_core_volume_backup as a left join oci_identity_compartment as c on c.id = a.compartment_id;