turbot/alicloud_thrifty

Control: Old snapshots should be deleted if not required

Description

Old snapshots are likely unneeded and costly to maintain.

Usage

steampipe check alicloud_thrifty.control.ecs_snapshot_max_age

Plugins & Tables

Params

ArgsNameDefaultDescription
$1ecs_snapshot_age_max_days
90
The maximum number of days a snapshot can be retained.

SQL

select
'acs:acs:' || region || ':' || account_id || ':' || 'snapshot/' || snapshot_id as resource,
case
when creation_time > current_timestamp - interval '90 days' then 'ok'
else 'alarm'
end as status,
snapshot_id || ' created at ' || creation_time || ' (' || date_part('day', now() - creation_time) || ' days).'
as reason,
region,
account_id
from
alicloud_ecs_snapshot;

Tags