# ELK - index pattern configuration as code

**URL:** https://discuss.elastic.co/t/elk-index-pattern-configuration-as-code/254308
**Category:** Kibana
**Created:** [November 4, 2020, 4:47pm UTC](https://discuss.elastic.co/t/elk-index-pattern-configuration-as-code/254308 "2020-11-04T16:47:40Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![krishkir\_k](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krishkir_k/32/78414_2.png) [@krishkir\_k](https://discuss.elastic.co/u/krishkir_k)
#### Post date: [November 4, 2020, 4:47pm UTC](https://discuss.elastic.co/t/elk-index-pattern-configuration-as-code/254308/1 "2020-11-04T16:47:40Z")

</div>

Is there a way to configure default index pattern in configuration file so I wouldn't have to set it manually after each redeploy?Also  
to configure and persist field level format ?

---

<div class="post-metadata">

### Author: ![Aaron\_Caldwell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron_caldwell/32/45755_2.png) [@Aaron\_Caldwell](https://discuss.elastic.co/u/Aaron_Caldwell)
#### Post date: [November 4, 2020, 11:08pm UTC](https://discuss.elastic.co/t/elk-index-pattern-configuration-as-code/254308/2 "2020-11-04T23:08:05Z")

</div>

Hello,

You could set the default index pattern programatically as outlined in [this thread](https://discuss.elastic.co/t/how-to-create-a-default-index-pattern-via-kibana-api/238905).

Regards,  
Aaron

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [December 2, 2020, 11:08pm UTC](https://discuss.elastic.co/t/elk-index-pattern-configuration-as-code/254308/3 "2020-12-02T23:08:06Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
