What's the proper way to use the `secrets` argumen...
# prefect-community
w
What's the proper way to use the
secrets
argument in prefect docker storage object? I tried doing
Copy code
flow.storage = Docker(....,secrets=["SECRET_NAME"])
But when I try running the flow It fails to start and I get this error message from apollo
Copy code
{
  "message": "Cannot query field \"secret_value\" on type \"Query\".",
  "locations": [
    {
      "line": 2,
      "column": 9
    }
  ],
  "extensions": {
    "code": "GRAPHQL_VALIDATION_FAILED"
  }
}
I want to avoid sending in my secret values as environment variables to my docker images so was hoping the secrets arg would solve this for me
k
Hey @Will Milner, That should be the way to configure a Docker Secret, though I know we recently changed the Secret API a bit. Let me get some more information for you.
👍 1
So you may be encountering this issue if you’re using Prefect Server with your infrastructure. Prefect Server doesn’t fully support Secrets because it is an open-source solution and requires more infrastructure for fully-featured secret handling. We did not want to push out a half-baked solution for the open-source UI when Cloud has a rich API for handling secrets! I would highly recommend Prefect Cloud anyway for all the other features included, there’s even a free Scheduler tier.
w
got it, thanks for the response
👍 1