i'm trying to use a prefect secret in the most basic way and am having some difficulty...my call
Secret("SECRET_KEY").get()
fails when I try to register my flow:
Copy code
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 there
Sean Talia
02/09/2021, 3:01 PM
given how lightweight the documentation on using secrets is, this seems like it should be very straightforward...does one need to explicitly set
use_local_secrets = false
in the config.toml?
a
Amanda Wee
02/09/2021, 3:12 PM
It sounds like it: "For Cloud users, if the secret is not found in local context and
config.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.
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.