Last updated Mar 9, 2023

Rate this page:

What is configuration as code?

What is configuration as code?

Configuration as code (config as code) is an automated method of maintaining Compass component data in a Git repository. You can choose to declare component details in a YAML file that sits alongside the source code for the component itself. Learn more about how config as code works

Why should I sync a component?

With config as code, you can take an existing Compass component and move its source of truth to a YAML configuration file in your code repository. Once you connect the component with your repository, update the component's data by updating the YAML configuration file. Any updates to the YAML file on your repository’s default branch automatically sync back to Compass and reflect in Compass.

In this way, you can use the same version control practices for maintaining component data as you use for the rest of your codebase.

What tools can I use to manage synced components?

Compass currently supports config as code with Bitbucket Cloud, GitHub Cloud, and GitLab.com.

How does config as code work?

Here’s how config as code works:

Benefits of config as code

  • Manage your component right next to your source code without needing to navigate to the UI.
  • Governance over who can update component catalog information.
  • Version control your component metadata.
  • Update your compass.yaml files with scripts or build jobs to help keep information fresh.

Rate this page: