diff --git a/docs/10-cleanup.md b/docs/10-cleanup.md index 452b58a..72967b7 100644 --- a/docs/10-cleanup.md +++ b/docs/10-cleanup.md @@ -67,7 +67,7 @@ KUBERNETES_HOSTS=(controller0 controller1 controller2 worker0 worker1 worker2) ``` for host in ${KUBERNETES_HOSTS[*]}; do INSTANCE_ID=$(aws ec2 describe-instances \ - --filters "Name=tag:Name,Values=${host}" | \ + --filters "Name=tag:Name,Values=${host}" "Name=instance-state-name,Values=running,stopped" | \ jq -j '.Reservations[].Instances[].InstanceId') aws ec2 terminate-instances --instance-ids ${INSTANCE_ID} done