Thread
#prefect-community
    jars

    jars

    2 years ago
    Quick question - docs (https://docs.prefect.io/api/latest/environments/storage.html#docker) say the Docker parameter:
    secrets(List[str], optional)
    a list of Prefect Secrets which will be used to populate 
    prefect.context
     for each flow run.
    Used primarily for providing authentication credentials.
    It's not clear how I can access these secrets inside my flow. I've tried, exploring the
    prefect.context
    object, but can't seem to find anything. Any examples or guidance?
    And a side question, my secrets are key/value pairs, but the first argument is a list of strings, so what is the expected format? Is it like this:
    ["foo=bar", "x=y"]
    ?
    Perhaps the secrets don't get passed because I'm using the
    dockerfile
    strategy?
    Chris White

    Chris White

    2 years ago
    Hi jars - that docstring could be improved; the list of secrets are the names of Prefect Cloud secrets that you wish to use within your Flow.
    jars

    jars

    2 years ago
    ahhhh
    thanks @Chris White