output { kafka { {% for key, value in logstash_kafka_options.items() %} {% if value is number %} {{ key }} => {{ value }} {% elif value is iterable and value is not string %} {{ key }} => "{{ value | join(',') }}" {% else %} {{ key }} => "{{ value }}" {% endif %} {% endfor %} } }