adobe / helix-deploy

A multi-cloud deployment tool for serverless functions running on AWS Lambda, Adobe I/O Runtime, Azure Functions, and Google Cloud Functions. Write once, run everywhere.
Apache License 2.0
12 stars 16 forks source link

feat: support environment variable interpolation in config using syntax ${env.VAR_NAME} #648

Closed tripodsan closed 8 months ago

tripodsan commented 8 months ago

fixes #644

Description

Interpolates environment variables in parsed configuration using yargs middleware. Once the config is read from the combination of the CLI arguments, package.json and environment variables, the resulting object is updated replacing ${env.VARIABLE_NAME} with the value of process.env.VARIABLE_NAME (assuming such a variable exists).

The current use of ${version} in the name config property is not impacted since that is not prefixed with env..

Related Issue

644

Motivation and Context

See #644

How Has This Been Tested?

Local testing

Screenshots (if appropriate):

Types of changes

Checklist: