Terraform Cloud - Exited Agent Clean Up

When a terraform cloud agent de-registers the agent in the pool switches to the exited state. These exited state agents stay around indefinitely. When using the -single switch this leads to a lot of exited agents building up in the pool. Is there a way of having:

  1. An agent register with the same id so the state switches from exited to idle when it re-registers.


  1. Agents which have an exited state be automatically removed from the agent pool

We’re currently running into the same issue with our PoC of running agents in a Kubernetes cluster. Any information is appreciated.

EDIT: Looks like “exited” agents are removed from the UI after a few hours. That’s perfectly fine for us!
@philip.lewis Is this also working for you?

Yep - in the end we moved away from agents because of the cost