Hi - I am running into an issue with `PrefectSecre...
# ask-community
i
Hi - I am running into an issue with
PrefectSecret
and
coiled
. Posted the question on stack in case somebody else runs into this. https://stackoverflow.com/questions/66664086/how-does-one-use-prefect-cloud-secrets-with-coiled
Hi @Chris White - Pinging you because you might be the only person I know can answer this question right off the bat. How would you pass a
prefect cloud
auth token to
coiled
? I am getting client authentication type errors using
PrefectSecrets
-- which in previous deployments did not occur i.e. ECS.
coiled
is weird since its both execution and run config (IMO). -- Thanks again
c
Hey itay - it appears you are mixing local runs with cloud runs; if you want to leverage cloud you should use an agent which would do all of this for you. Otherwise you can try to add your auth token to context with you call flow.run; I believe you’ll need to add it to context.config.cloud.auth_token - on mobile so I can’t provide a code sample atm
i
@Chris White Thanks! Let me see how that works
👍 1
Hi @Chris White - No luck on my end. Whenever you have a chance -- An example will be helpful. I tried a few different approaches using
context
(1) Putting
[context]
in the
~/.prefect/config.toml
with the
auth_token
-- so context is global (per the docs) (2) Various attempt at
with statements.
Other approaches I tried include using the
upload_file("~/.prefect/config.toml")
in the dask executor configuration client kwargs. Which if I could get it to work would be the most elegant in my use case. Thanks again for all your help
c
Ultimately this isn’t really a supported use case; putting your auth token in config.toml like this:
Copy code
[cloud]
auth_token = "XXX"
should work though
i
Trying it again - Just discovered I wasn't doing something right on the coiled end.... 🙃
😄 1
It works. On to the next bug. 🙏
💯 1