Howdy, We are trying to streamline configurations...
# prefect-community
Howdy, We are trying to streamline configurations in our tasks but are unable to use the Prefect Secrets due to security. Our rough draft used
inside the tasks so that we pulled the secrets in at runtime but this is becoming incredibly unruly. I want to use a config library like dynaconfig so that I can mix settings files with env files. What is the best practice to load up the variables at run time in a smart way? Would the loading be a task that then pushes the config into the Prefect context?
Hi @jeff n - I wouldn't advise you to modify context in the context (ha!) of a running task (in fact we may prohibit this). If you need runtime variables it might make more sense to load them into a single toml file and reference the specific values you need directly from that. In the single-task setup you described, you could pull those variables in and return a dict from that task, whose values you can pass to the downstream tasks that need them
Ah ok. Thank you for the clarification
I will try that
👍 1