Adam Brusselback
05/05/2021, 3:29 AMChris White
-e PREFECT__CONTEXT__SECRETS_SOMENAME=SOMEVALUE
flag to set different secret values per run, and you can label each individual run appropriately so that the right agent picks it upAdam Brusselback
05/05/2021, 5:42 AMAdam Brusselback
05/05/2021, 5:48 AMChris White
@task(checkpoint=False) # prevents writing the data anywhere
def load_secrets(config):
# build dictionary of secrets as you are doing above
return secrets_dictionary # actually return the secrets dictionary
and then accept this dictionary in your downstream tasks that need the various secrets.
FYI the labels <-> agent solution is one of the supported ways you can send the same flow to different runtime environments (you can schedule a flow to run multiple times simultaneously with different labels, for example).Adam Brusselback
05/05/2021, 5:57 AMChris White
config
dictionary since it is an input to your load_context
task, and that config object contains sensitive secret information; just wanted to raise that to your attention so that whatever task is returning the config
object is configured in a way makes sense for your use caseAdam Brusselback
05/05/2021, 6:05 AMChris White