How can I expose a local environment variable to G...
# 🤖|ask-kapa
g
@microscopic-river-74022 How can I expose a local environment variable to Garden's execution environment?
m
Please stand by @glamorous-kangaroo-20427 as I search the knowledge base. I normally take about 15 seconds or so. :wave:
---------------------- You can expose a local environment variable to Garden's execution environment by using the
${local.env.<env-var-name>}
template string in your Garden configuration. This template string represents the value of the specified environment variable. Here is an example of how you can use it:
Copy code
yaml
kind: Workflow
name: my-workflow
envVars:
  MY_ENV_VAR: ${local.env.MY_ENV_VAR}
In this example,
MY_ENV_VAR
is the name of the local environment variable you want to expose. Replace
MY_ENV_VAR
with the name of your actual environment variable. For more details, you can refer to the Garden's documentation on Environment template context (), Provider template context (), Custom Command template context (), Workflow template context (), Action (all fields) template context (), Action spec template context (), Project Output template context (), and Module template context (). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
message has been deleted