turbot/digitalocean_thrifty

GitHub
Loading controls...

Control: Load balancers not assigned to any droplet should be reviewed

Description

Load balancers are charged on an hourly basis. Unused load balancers should be reviewed, if not assigned to any droplets.

Usage

Run the control in your terminal:

steampipe check digitalocean_thrifty.control.network_load_balancer_unused

Snapshot and share results via Steampipe Cloud:

steampipe login
steampipe check --share digitalocean_thrifty.control.network_load_balancer_unused

Plugins & Tables

SQL

select
b.urn as resource,
case
when jsonb_array_length(b.droplet_ids) < 1 then 'alarm'
else 'ok'
end as status,
b.title || ' assigned with ' || jsonb_array_length(b.droplet_ids) || ' droplet(s).' as reason,
r.name as region
from
digitalocean_load_balancer as b
left join digitalocean_region as r on r.slug = b.region_slug;

Tags