This repository has been archived by the owner on Jul 16, 2024. It is now read-only.
Add leave_on_terminate with default true for graceful leave
The consul default for leave_on_terminate is false; however running consul in docker means we need to set this to true: when the docker container exits, local data in the container is lost; therefore we need to send a graceful leave before exiting. Docker stop (and ECS Stop Task) send a TERM.
Note that without leave_on_terminate set to true, when ECS stops a consul task the cluster does still convert the node from failed to left via Forced Leave; however it would be preferred to send a graceful leave and not rely on the Forced leave.