Skip to main content

Sync instance configuration file

The configuration file allows you to define the ressources needs for the sync. The file should be formatted as a Yaml file, have the filename config.yml. During the generation phase, the Sync adapters, and models will be generated in the same folder.

The following settings can be defined:

Configuration fields

Describes the overall synchronization configuration.

PropertyTypeDescriptionMandatory
namestringUnique identifier for the sync instance.Yes
storeSyncStoreConfiguration for the optional storage mechanism.No
sourceSyncAdapterConfiguration for the source adapter.Yes
destinationSyncAdapterConfiguration for the destination adapter.Yes
orderList of stringsSpecifies the order in which objects should be synchronized.Yes
schema_mappingList of SchemaMappingModelDefines how data is mapped from source to destination.Yes

Sync store

Optional configuration for a storage mechanism used for stateful synchronization.

PropertyTypeDescriptionMandatory
typestringType of the store (for example redis).Yes
settingsDictionaryConnection details and other settings for the store.No

Source and Destination

Configuration for source and destination adapters.

PropertyTypeDescriptionMandatory
namestringIdentifier for the adapter.Yes
settingsDictionaryAdapter-specific settings like url and token. If not provided, values will be loaded from environment variables.No

Schema Mapping

Defines the mappings from source to destination schemas.

Mapping models

PropertyTypeDescriptionMandatory
namestringInfrahub model name to be mapped.Yes
mappingstringThe source's schema mapping (API) path.Yes
identifiersList of stringsFields used to uniquely identify an object.Yes
fieldsList of SchemaMappingFieldDescribes individual field mappings or transformations.Yes
Mapping field
PropertyTypeDescriptionMandatory
namestringName of the field.Yes
mappingstringHow the field is mapped from source to destination.No
staticAnyA static value to assign to the field, used if mapping is not provided.No
referencestringReference to another object in the configuration, used if direct mapping is not applicable.No