https://prefect.io logo
Title
j

jars

05/30/2020, 10:43 PM
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?
c

Chris White

05/30/2020, 10:49 PM
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.
j

jars

05/30/2020, 10:52 PM
ahhhh
thanks @Chris White
👍 1