ConfigStore provides way to store, track, manage and share configuration data in a centralised, version-controlled repository. Each ConfigStore record contains Key, Value, and Metadata information that can be shared across all of your applications.
Some of the advantages of using ConfigStore are:
- Common configuration variables can be shared between different applications (even if they use different cloud providers, different regions or different frameworks)
- Configuration variables are pulled from a central repo and don’t need to be hardcoded into configuration files and shipped out to servers. This makes updating variables quicker and more reliable
- Variables can be queried via the API
- ConfigStore supports wildcards in keys to allow for filtering and contextual lookups
You can use ConfigStore with any Cloud 66 application. One example of a use case might be a centralised place to store different webhooks per environment for a monitoring service like New Relic or Scout, or API parameters for a push notification service like OneSignal or Amazon SES.
ConfigStore vs environment variables
When you add environment variables to your application they become Linux operating system environment variables.
ConfigStore provides an alternative place to store centralised information that will not be exposed in OS level environment variables.
ConfigStore Data Structure
Data edited in ConfigStore via the Dashboard is text only and is structured as:
- Key — A text based
- Value — A text based
- Metadata — A comma separated list of
key=valuepairs. For example:
Levels of ConfigStore
There are two levels of ConfigStore:
- At application level
- At account level
To access ConfigStore for a particular application:
- Open the Application Overview from your Dashboard
- Click on Configuration in the Application panel on the right of the screen
- Click on the ConfigStore tab at the top of the main panel
This page provides a way to store information where the scope is limited to a specific application. Variables stored in this repository will not automatically be available to any other application in your account. This is useful for storing variables that are either very application-specific or where the risk of sharing outweighs the benefits of centralisation.
To access your account-wide ConfigStore:
- Open your Dashboard
- Click on your account avatar (top-right) and select Account Settings
- Click on ConfigStore in the Account panel on the left
This provides a way to store config information globally that can be referenced by all of your applications. This is useful for sharing common variables and variable patterns across all of your applications.
This approach requires some additional care and planning to prevent unintended consequences, such as applications connecting to incorrect resources or cloud services and creating confusion or dirty data.
The Metadata field in ConfigStore is intended to store useful reminders about the nature of the configuration variable being stored. This can include:
- The type of value (e.g. integer, string, GUID etc.)
- A description of the configuration variable
- Valid format(s) for the variable (e.g.
…and essentially anything else that might be useful to know about any configuration variable.
Every ConfigStore has its own unique namespace in the form of a 36-character GUID. This includes both account level and application level ConfigStores.
You can find the namespace:
- For an application: under Config → ConfigStore tab
- For an account: under Account Settings → ConfigStore
This namespace can be used to reference a particular ConfigStore, either via the API or using placeholders in configuration templates (see below).
Accessing ConfigStore Variables
You access ConfigStore data by using the following syntax:
To load values from ConfigStore as environment variables in any application, open the Environment Variables page via your Dashboard and use the following format as the value for any key:
The following syntax must be used for service.yml:
envs: - ABC: _env(XYZ)
This will define
XYZ as an environment variable for the given service, which pulls
ABC from the Application which in turn could come from the ConfigStore.