turbot/digitalocean_thrifty

Control: Database clusters created over 90 days ago should be reviewed

Description

Database clusters created over 90 days ago should be reviewed and deleted if not required.

Usage

Run the control in your terminal:

powerpipe control run digitalocean_thrifty.control.database_long_running

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run digitalocean_thrifty.control.database_long_running --share

Steampipe Tables

Params

ArgsNameDefaultDescriptionVariable
$1database_age_max_days
90
The maximum number of days databases are allowed to run.

SQL

select
d.urn as resource,
case
when date_part('day', now() - d.created_at) > $1 then 'alarm'
else 'ok'
end as status,
d.title || ' of ' || d.engine || ' type in use for ' || date_part('day', now() - d.created_at) || ' day(s).' as reason
, r.name as region
from
digitalocean_database as d
left join digitalocean_region as r on r.slug = d.region_slug;

Tags