How to Clean Up AWS Load Balancers
When compute instances are removed, their load balancers are sometimes left behind.
cleanup_aws_loadbalancers plugin can find and delete these orphaned load balancers.
> config edit resoto.worker
Enable cleanup by modifying the
resotoworkersection of the configuration as follows:
# Enable cleanup of resources
# Do not actually cleanup resources, just create log messages
# How many cleanup threads to run in parallel
When cleanup is enabled, marked resources will be deleted as a part of the
collect_and_cleanupworkflow, which runs each hour by default.tip
trueto simulate cleanup without actually deleting resources.
plugin_cleanup_aws_loadbalancerssection, setting the
true:cleanup_aws_loadbalancers plugin configuration
# Enable plugin?
# Minimum age of unused load balancers to cleanup
The above plugin configuration cleans up ELBs, ALBs, and ALB target groups older than the minimum age with no attached backends. Items tagged with
expiration: neverwill not be flagged for cleanup.
Each time the
cleanup_aws_loadbalancers plugin runs, orphaned load balancers will be flagged for removal during the next cleanup run.