Define environment variables

How to define environment variables in your Score specification


You can pass environment-specific configuration to the container during a deployment. The Score Specification enables a special environment resource type to be used to support such use cases.

Environment configurations are set within the resource section of your Score Specification file. These act as environment variables when you’re deploying a Workload.

Values for those variables can be either hard-coded (not recommended) or sourced from the resources properties through substitutions (recommended) such as ${}.

The Score Specification supports declaring environment variables in a configurations files or as a shell value.

For more information, see