Environment Variables

Using environment variables

You can use environment variables to dynamically populate Hashboard configuration files with different values at runtime. At this time this only works with the CLI and not if you trigger builds from the App with our git integration.

When creating a Build using local files, the CLI will replace placeholders of the form ${ENV_VAR_NAME} with the corresponding environment variable. For example, if your model file contains:

hb_version: "1.0"
name: My Data Model
  physicalName: test_table

...then you can preview a Build against your dev database by running:


Environment variable substitution is not yet supported for Builds that are triggered via a git revision.

Escaping dollar signs

If you want to include a literal '$' in your configuration file (i.e. not as a placeholder for an environment variable), you can escape it by doubling it up. For example:

hb_version: "1.0"
name: Revenue
description: This year's revenue in $$

...will create a resource with description This year's revenue in $.