Home > Storage > ObjectScale and ECS > Product Documentation > Deploying the Elastic Stack with Searchable Snapshots and Frozen Tier > Create index template
For both VDC indexes, an index template is then created. This ensures that as indexes ‘roll’ they can reference thistemplate for the new index to be created from.
PUT /_index_template/template-ecs-vdc1-index
{
"index_patterns": ["ecs-vdc1-index-*"],
"template": {
"mappings": {
"properties": {
"ecstimestamp": { "type": "date", "format": "yyyy-MM-dd HH:mm:ss,SSS" },
"request_id": { "type": "keyword" },
"ecs_ip": { "type": "ip" },
"ecs_port": { "type": "keyword" },
"client_ip": { "type": "ip" },
"client_port": { "type": "keyword" },
"user": { "type": "keyword" },
"agent": { "type": "text" },
"method": { "type": "keyword" },
"namespace": { "type": "keyword" },
"bucket": { "type": "keyword" },
"key": { "type": "text" },
"query": { "type": "text" },
"http_version": { "type": "float" },
"response_code": { "type": "keyword" },
"duration": { "type": "long" },
"upload_bytes": { "type": "long" },
"download_bytes": { "type": "long" },
"ecs_latency": { "type": "long" },
"range": { "type": "text" },
"copy": { "type": "text" },
"site": { "type": "keyword" },
"deep_copy_size": { "type": "long" },
"xforwardedfor": { "type": "ip" }
}
},
"settings": {
"number_of_shards": 3,
"number_of_replicas": 1,
"index.lifecycle.name": "ecsfrozensearch",
"index.lifecycle.rollover_alias": "ecs-vdc1-index"
}
}
}
PUT /_index_template/template-ecs-vdc2-index
{
"index_patterns": ["ecs-vdc2-index-*"],
"template": {
"mappings": {
"properties": {
"ecstimestamp": { "type": "date", "format": "yyyy-MM-dd HH:mm:ss,SSS" },
"request_id": { "type": "keyword" },
"ecs_ip": { "type": "ip" },
"ecs_port": { "type": "keyword" },
"client_ip": { "type": "ip" },
"client_port": { "type": "keyword" },
"user": { "type": "keyword" },
"agent": { "type": "text" },
"method": { "type": "keyword" },
"namespace": { "type": "keyword" },
"bucket": { "type": "keyword" },
"key": { "type": "text" },
"query": { "type": "text" },
"http_version": { "type": "float" },
"response_code": { "type": "keyword" },
"duration": { "type": "long" },
"upload_bytes": { "type": "long" },
"download_bytes": { "type": "long" },
"ecs_latency": { "type": "long" },
"range": { "type": "text" },
"copy": { "type": "text" },
"site": { "type": "keyword" },
"deep_copy_size": { "type": "long" },
"xforwardedfor": { "type": "ip" }
}
},
"settings": {
"number_of_shards": 3,
"number_of_replicas": 1,
"index.lifecycle.name": "ecsfrozensearch",
"index.lifecycle.rollover_alias": "ecs-vdc2-index"
}
}
}