Sean Talia
02/09/2021, 2:58 PMSecret("SECRET_KEY").get()
fails when I try to register my flow:
ValueError: Local Secret "SECRET_KEY" was not found.
my backend is set to cloud
, and I do not have use_local_secrets = true
set in my config.toml, so I'm not sure why prefect is trying to actually retrieve a local secret thereuse_local_secrets = false
in the config.toml?Amanda Wee
02/09/2021, 3:12 PMconfig.cloud.use_local_secrets=False
, the base Secret
class queries the Prefect Cloud API for a stored secret."
So you satisfy the first condition, but without explicitly setting it to false, the second condition is not satisfied.Sean Talia
02/09/2021, 3:13 PMFina Silva-Santisteban
02/10/2021, 12:40 AMprefect.context.setdefault("secrets",{})
prefect.context.secrets["EMAIL_USERNAME"] = (SOME_EMAIL)
The first line checks if the secrets
dictionary already exists, and if it doesn’t, creates it for you. The second one shows you how to add values to it. I hope this helps!