# Apply Configuration Automatically to Existing Kong

**URL:** <https://discuss.konghq.com/t/apply-configuration-automatically-to-existing-kong/4709>\
**Category:** Questions\
**Created:** [October 21, 2019, 8:47pm UTC](https://discuss.konghq.com/t/apply-configuration-automatically-to-existing-kong/4709 "2019-10-21T20:47:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbooali](https://avatars.discourse-cdn.com/v4/letter/m/97f17d/32.png) [@mbooali](https://discuss.konghq.com/u/mbooali)\
**Post date:** [October 21, 2019, 8:47pm UTC](https://discuss.konghq.com/t/apply-configuration-automatically-to-existing-kong/4709/1 "2019-10-21T20:47:55Z")

</div>

Is there any way to apply a YAML file to Kong API to configure the service, routes, and apply the configuration based on the YAML file. These patches should be applied to the already running Kong instance.

I’m not talking about the database-less. For instance, right now we can make many curl calls to apply different settings. Any already created automated thing such as ansible or something similar.

---

<div class="post-metadata">

**Author:** ![kpatio](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/kpatio/32/1432_2.png) [@kpatio](https://discuss.konghq.com/u/kpatio)\
**Post date:** [October 24, 2019, 12:29pm UTC](https://discuss.konghq.com/t/apply-configuration-automatically-to-existing-kong/4709/2 "2019-10-24T12:29:44Z")

</div>

You can use `kong config db_import kong.yml` for that. Note: this updates the existing configuration that matches, but doesn’t delete any other resources.

---

<div class="post-metadata">

**Author:** ![hbagdi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/hbagdi/32/562_2.png) [@hbagdi](https://discuss.konghq.com/u/hbagdi)\
**Post date:** [October 28, 2019, 6:16pm UTC](https://discuss.konghq.com/t/apply-configuration-automatically-to-existing-kong/4709/3 "2019-10-28T18:16:47Z")

</div>

> [@mbooali](#):
>
> I’m not talking about the database-less. For instance, right now we can make many curl calls to apply different settings. Any already created automated thing such as ansible or something similar.

Have you tried out decK?

> **[GitHub - Kong/deck: decK: Configuration management and drift detection for Kong](https://github.com/Kong/deck)**
>
> decK: Configuration management and drift detection for Kong - GitHub - Kong/deck: decK: Configuration management and drift detection for Kong
