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:
powerpipe control run alicloud_thrifty.control.ecs_snapshot_max_ageSnapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run alicloud_thrifty.control.ecs_snapshot_max_age --shareSteampipe Tables
SQL
select  'acs:acs:' || region || ':' || account_id || ':' || 'snapshot/' || snapshot_id as resource,  case    when date_part('day', now() - creation_time) < $1 then 'ok'    else 'alarm'  end as status,  snapshot_id || ' created at ' || creation_time || ' (' || date_part('day', now() - creation_time) || ' days).'  as reason    , account_id, regionfrom  alicloud_ecs_snapshot;
Params
| Args | Name | Default | Description | Variable | 
|---|---|---|---|---|
| $1 | ecs_snapshot_age_max_days |  | The maximum number of days a snapshot can be retained. |