Loading controls...
Control: Old snapshots should be deleted if not required
Description
Old snapshots are likely unneeded and costly to maintain.
Usage
Run the control in your terminal:
steampipe check alicloud_thrifty.control.ecs_snapshot_max_age
Snapshot and share results via Steampipe Cloud:
steampipe loginsteampipe check --share alicloud_thrifty.control.ecs_snapshot_max_age
Plugins & Tables
Params
Args | Name | Default | Description | Variable |
---|---|---|---|---|
$1 | ecs_snapshot_age_max_days |
| 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_idfrom alicloud_ecs_snapshot;