Jacob Blanco

    Jacob Blanco

    10 months ago
    Cloud supports Secrets in JSON format, but how do I setup a JSON secret locally setting in
    config.toml
    ?
    Anna Geller

    Anna Geller

    10 months ago
    @Jacob Blanco try using environment variable:
    export PREFECT__CONTEXT__SECRETS__JSON_SECRET="{'a': 1, 'b': 2}"
    to test it, run as a script in the same terminal session:
    from prefect.tasks.secrets import PrefectSecret
    
    x = PrefectSecret("JSON_SECRET").run()
    print(x)
    Jacob Blanco

    Jacob Blanco

    10 months ago
    Oh awesome thanks!