Hi, how do i toggle local/cloud get of PrefectSecr...
# ask-community
h
Hi, how do i toggle local/cloud get of PrefectSecrets? I set a few keys in the cloud UI but I am unable to retrieve them with PrefectSecret currently
k
export PREFECT___CLOUD____USE_LOCAL_SECRETS=false_
upvote 2
a
Also: can you check if your backend points to Cloud?
Copy code
prefect backend cloud
And can you share how you leverage the PrefectSecret task? You need to run this task within the flow block
h
TESTKEY = PrefectSecret("test")
I might have caused myself some confusion, I was trying to access cloud secrets while running locally with flow.run() - so this is possible if i change the
export PREFECT___CLOUD____USE_LOCAL_SECRETS=false_
a
do you define this task within the Flow block?
h
Yep