turbot/alicloud_thrifty
Loading controls...

Control: Long running RDS DB instances should have billing type as 'Subscription' instead of 'Pay-as-you-go'.

Description

Subscription billing for long running RDS DB instances is more cost effective and you can receive larger discounts for longer subscription periods.

Usage

Run the control in your terminal:

powerpipe control run alicloud_thrifty.control.rds_db_instance_long_running

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run alicloud_thrifty.control.rds_db_instance_long_running --share

Steampipe Tables

Params

ArgsNameDefaultDescriptionVariable
$1rds_db_instance_age_max_days
90
The maximum number of days DB instances can be running.
$2rds_db_instance_age_warning_days
30
The number of days DB instances can be running before sending a warning.

SQL

select
arn as resource,
case
when date_part('day', now() - creation_time) > $1 then 'alarm'
when date_part('day', now() - creation_time) > $2 then 'info'
else 'ok'
end as status,
title || ' has been in use for ' || date_part('day', now() - creation_time) || ' days.' as reason,
account_id,
region
from
alicloud_rds_instance
where
pay_type = 'Postpaid';

Tags