I have built an AIO Action that relies on a .env variable for API keys.
The .env file exists in the root folder, the app.config.yaml file has been updated to include the variable reference in the inputs section
I expect that aio app dev will load the .env file and substitute the variable reference (e.g. $TEST_VARIABLE) with the value assigned in the .env file. Thus, my action would have the actual value at runtime.
Actual Behaviour
The variable in app.config.yaml is not being substituted during the build process. Therefore, the variable value is the literal variable name (e.g. $TEST_VARIABLE).
Populate a .env file in the project root and fill it as shown below
run aio app dev at the command line
run curl https://localhost:9080/api/v1/web/aio-app-dev-bug-mac/env -k at the command line
The result will be {"envVariableValue":"$TEST_VARIABLE"} where the literal variable name "$TEST_VARIABLE" is returned instead of the actual value of the TEST_VARIABLE "HELLO_WORLD"
.env
You can generate this file using the command aio app use.
# This file must **not** be committed to source control
## please provide your Adobe I/O Runtime credentials
# AIO_RUNTIME_AUTH=
# AIO_RUNTIME_NAMESPACE=
TEST_VARIABLE=HELLO_WORLD
Expected Behaviour
I have built an AIO Action that relies on a .env variable for API keys. The .env file exists in the root folder, the app.config.yaml file has been updated to include the variable reference in the inputs section I expect that aio app dev will load the .env file and substitute the variable reference (e.g. $TEST_VARIABLE) with the value assigned in the .env file. Thus, my action would have the actual value at runtime.
Actual Behaviour
The variable in app.config.yaml is not being substituted during the build process. Therefore, the variable value is the literal variable name (e.g. $TEST_VARIABLE).
Reproduce Scenario (including but not limited to)
I have build a simple project that replicates the bug: https://git.corp.adobe.com/mboucher/aio-app-dev-bug-mac
Steps to Reproduce
.env
file in the project root and fill it as shown belowaio app dev
at the command linecurl https://localhost:9080/api/v1/web/aio-app-dev-bug-mac/env -k
at the command lineThe result will be
{"envVariableValue":"$TEST_VARIABLE"}
where the literal variable name "$TEST_VARIABLE" is returned instead of the actual value of the TEST_VARIABLE "HELLO_WORLD".env
You can generate this file using the command
aio app use
.Environment Info
Sample Code that illustrates the problem
https://git.corp.adobe.com/mboucher/aio-app-dev-bug-mac
Logs taken while reproducing problem