What?

Environment variables are the means by which the Cloud Foundry runtime communicates with a deployed application about its environment. You can use them too!

How?

  1. Run cf set-env dora SOME_VAR some-var-value
  2. cf env dora

Expected Result

The cf CLI will show the application’s environment variables classified as System-Provided (i.e. VCAP_APPLICATION) and User-Provided (including SOME_VAR). Running and Staging variables are provided by operators that apply to all applications.

Resources

Docs: Cloud Foundry Environment Variables Docs: What is a Runtime Environment (RTE)? Docs: VCAP_APPLICATION Docs: VCAP_SERVICES Wikipedia: What is an environment variable?