#!/bin/bash

echo "Apply elasticsearch index templates"
curl -w "\n" --user elastic:changeme -X PUT "localhost:9200/_component_template/normalized_component" -H 'Content-Type: application/json' -d"$(< /mapping/normalized-component.json)"
curl -w "\n" --user elastic:changeme -X PUT "localhost:9200/_index_template/normalized" -H 'Content-Type: application/json' -d"$(< /mapping/normalizer-index.template.json)"
# curl -X PUT "localhost:9200/_index_template/arma-*_template?pretty" -H 'Content-Type: application/json' -d"$(< /mapping/normalized-event.json)"
