https://prefect.io logo
j

Jacob Bedard

06/15/2022, 5:07 PM
Hi Folks, I'm finding myself in a pickle I was in before, where I'm trying to just pull a secret from my cloud setup, and I did this in my python script in the last place I ran prefect, but I can't get it to work. While I was developing, I was able to simply set the use_local_secrets = False, and I could just pull down a secret, but I can't get it to work anymore. I only see one short blurb about getting cloud secrets in the prefect API docs around secrets. Can someone help me with the right commands? I'm getting a message that it keeps looking for it locally
I tried running "prefect.config.cloud.use_local_secrets=False" beforehand, but it doesn't seem to do anything
I was able to solve this last time I ran into it, but I can't remember how, and the docs don't have quite what I need
k

Kevin Kho

06/15/2022, 5:14 PM
I think you want:
Copy code
export PREFECT__CLOUD__USE_LOCAL_SECRETS=false
j

Jacob Bedard

06/15/2022, 5:14 PM
That's for the CLI though, right? Wasn't there a python command for this?
Also, I can't find the config.toml file. Does that go somewhere different when prefect is installed in a conda environment?
Oh I had to make one, I discovered. I located the ".prefect/" dir, then used touch and vi to create a config file with that one setting in it
I was able to pull it down after that
Thanks for checking. It might be good to add a note in the config docs page that the document doesn't exist until you make it
k

Kevin Kho

06/15/2022, 5:59 PM
Oh glad you got it sorted out
6 Views