Cloud supports Secrets in JSON format, but how do ...
# ask-community
j
Cloud supports Secrets in JSON format, but how do I setup a JSON secret locally setting in
config.toml
?
a
@Jacob Blanco try using environment variable:
Copy code
export PREFECT__CONTEXT__SECRETS__JSON_SECRET="{'a': 1, 'b': 2}"
to test it, run as a script in the same terminal session:
Copy code
from prefect.tasks.secrets import PrefectSecret

x = PrefectSecret("JSON_SECRET").run()
print(x)
j
Oh awesome thanks!
🙌 1