Using Harness Config Variables in PCF Manifests

Updated 3 days ago by Chakravarthy Tenneti

Configuration variables and files enable you to specify information in the Service that can be referenced in other parts of the Harness Application.

In this topic:

Before You Begin

Review: Configuration Variables and Files

For example, you can specify a variable in the Service once, and then use it in multiple Workflows without having to manage multiple values.

  • Config Variables - You can create Service variables to use in your Manifests files, and in Environments and Workflows. Any Service variables are added as environment variables when the app is created in the Pivotal environment (cf push). Later, when you want to reference a Service variable, you use the syntax ${serviceVariable.var_name}.
  • Config Files - You can upload config files with variables to be used when deploying the Service. Later, when you want to reference a Service config file, you use the syntax ${configFile.getAsString("fileName")} for unencrypted text files and ${configFile.getAsBase64("fileName")} for encrypted text files.

For details on configuration variables and files, see Add Service Config Variables and Add Service Config Files.

Step: Using Config Variables in Manifests

You can use Config Variables in your Service in place of values in manifest.yml and vars.yml.

You can then overwrite this variable in a Harness Environment's Service Configuration Overrides, and the new value is used when the Service and Environment are used for deployment.

Overwriting Service variables is described in more detail in PCF Environments.

Next Steps

How did we do?