Loading controls...
Control: Kubernetes clusters created over 90 days ago should be reviewed
Description
Kubernetes clusters created over 90 days ago should be reviewed and deleted if not required.
Usage
Run the control in your terminal:
steampipe check digitalocean_thrifty.control.kubernetes_long_running
Snapshot and share results via Steampipe Cloud:
steampipe loginsteampipe check --share digitalocean_thrifty.control.kubernetes_long_running
Plugins & Tables
SQL
select a.urn as resource, case when status = 'deleted' then 'skip' when date_part('day', now() - created_at) > 90 and status in ('invalid', 'error') then 'alarm' when date_part('day', now() - created_at) > 90 then 'info' else 'ok' end as status, case when status = 'deleted' then ' SKIP' when date_part('day', now() - created_at) > 90 and status in ('invalid', 'error') then a.title || ' instance status is ' || status || ', has been launced for ' || date_part('day', now() - created_at) || ' day(s).' else a.title || ' has been launced for ' || date_part('day', now() - created_at) || ' day(s).' end as reason, b.name as regionfrom digitalocean_kubernetes_cluster a left join digitalocean_region as b on b.slug = a.region_slug;