https://flyte.org logo
#ask-the-community
Title
# ask-the-community
n

Nizar Hattab

08/22/2023, 9:49 AM
Hi everyone, I am trying to automatically register and deploy workflows, but I came across an issue of Environment Variables. I would like to register workflows with their env vars through a file (yaml or json). I've come across this pr https://github.com/flyteorg/flytepropeller/pull/576 which added environment config to launch plans, but couldn't find documentation of how to use this. Any suggestions, ideas on how to achieve that (passing env vars on registration or launchplans)?
s

Samhita Alla

08/23/2023, 5:32 AM
You can send environment variables to the
pyflyte run
command using the
--envs
flag: --envs JSON OBJECT OR JSON/YAML FILE PATH Environment variables to set in the container But I don't think it's available in the
pyflyte register
command. cc @Kevin Su
You should also be able to send env variables via flyte remote.
k

Kevin Su

08/23/2023, 6:16 AM
you can also set the env in @task
@task(env=<read json file>)
2 Views