---
title: Layering Configuration Documents
slug: ps/help/en_us/vtm/cfgimport/layering-configuration-documents
docTags: 
createdAt: 2026-08-02T08:46:48.935Z
---

The Configuration Importer can collect together and import multiple configuration documents at the same time if instructed to import from a directory. The Configuration Importer orders the documents alphabetically, and then constructs the configuration by layering the documents one on top of the other. You can build up configuration for the same object, such as a virtual server, over multiple documents, with later documents masking settings applied by earlier documents.

The following two example configuration documents reference the same "example-service" virtual server object. The "10-base-service.yaml" file is applied first and creates the base configuration for the service. The file "20-set-rules.yaml" is alphabetically second in order of priority and layered on top of the base configuration to add a TrafficScript rule to the virtual server, and to disable web caching.

| 10-base-service.yaml                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <br />`version: 6.1`<br />`virtual_servers:`<br />`- name: example-service`<br />`properties:`<br />`basic:`<br />`enabled: true`<br />`port: 80`<br />`protocol: http`<br />`pool: example-pool`<br />`web_cache:`<br />`enabled: true`<br />`pools:`<br />`- name: example-pool`<br />`properties:`<br />`basic:`<br />`passive_monitoring: true`<br />`monitors: [ "Simple HTTP" ]`<br />`nodes_table:`<br />`- node: application-server-1:8080`<br />`- node: application-server-2:8080` |

| 20-set-rules.yaml                                                                                                                                                                                                                                                                                   |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <br />`version: 6.1`<br />`virtual_servers:`<br />`- name: example-service`<br />`properties:`<br />`basic:`<br />`request_rules: [ set-host ]`<br />`web_cache:`<br />`enabled: false`<br />`rules:`<br />`- name: set-host`<br />`content: \|`<br />`http.setHeader("Host", "app1.example.com");` |

Importing the two documents applies configuration equivalent to the following single document:

| flattened-config.yaml                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <br />`version: 6.1`<br />`virtual_servers:`<br />`- name: example-service`<br />`properties:`<br />`basic:`<br />`enabled: true`<br />`port: 80`<br />`protocol: http`<br />`pool: example-pool`<br />`request_rules: [ set-host ]`<br />`web_cache:`<br />`enabled: false`<br />`pools:`<br />`- name: example-pool`<br />`properties:`<br />`basic:`<br />`passive_monitoring: true`<br />`monitors: [ "Simple HTTP" ]`<br />`nodes_table:`<br />`- node: application-server-1:8080`<br />`- node: application-server-2:8080`<br />`rules:`<br />`- name: set-host`<br />`content: \|`<br />`http.setHeader("Host", "app1.example.com");`<br /> |

Observe that both files specify the "virtual\_servers.properties.web\_cache.enabled" setting, although the Configuration Importer applies the "false" value in "20-set-rules.yaml" last, so this is the resultant setting applied to the Traffic Manager.

:::hint{type="info"}
Ivanti recommends limiting overlaying of specific settings within an object to basic scalar values. Layering semantics for non-scalar settings, such as lists or tables, is presently unspecified.
:::
