turbot/digitalocean_thrifty

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:

powerpipe control run digitalocean_thrifty.control.network_load_balancer_unused

Snapshot and share results via Turbot Pipes:

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

Steampipe 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