Where do we put logstash template?

I'm somewhat new to the ELK stack and I'm currently putting together my dev environment so I can get familiar with the different products. I already have gone through the process of setting up ElasticSearch, Logstash, and Kibana. I'm at the point where I want to define a template for logstash to read in Twitter documents.

There's a portion in the output block that you can set your template and template name. I'm wondering where exactly am I suppose to be putting my template.json file? From my understanding I always created a template via ElasticSearch, but this kinda throws me off as to what is really being asked here. Could someone explain this to me?

output {
  stdout { codec => dots }
  elasticsearch {
    hosts => "localhost:9200"
    index => "twitter"
    document_type => "tweet"
    template => "template.json"
    template_name => "twitter"

Where ever you want, just specify the full path and make sure it's readable.

You can still manage your template directly in Elasticsearch. Logstash offers to handle this in order to be able to load the default template and make it easier to get started with. For more complex deployments with multiple templates, it is probably easier to manage it directly in Elasticsearch.