fly redeploys each time I set a secret

Does this happen to anyone else? I have 10 or so secrets I need to add to my project and each time I add one it redeploys my project immediately lol

This is normal. Since secrets are environment variables, the app needs to restart to get a new one.

You can set multiple secrets at once, though. fly secrets set FIRST=asdf SECOND=jklm will work just fine, only one restart required.

oh nice, thanks for a quick response. I don’t think it mentions that anywhere in the docs? if it did I definitely missed it

Actually it is mentioned on first example here:

flyctl secrets set · Fly Docs

flyctl secrets set [flags] NAME=VALUE NAME=VALUE ...

I want to fly secrets import < .env to import my local secrets then override a secret by fly secrets set DEBUG=False, is there a way to avoid the import one to trigger a deployment before getting the chance to override some variables ? Or is my only option to modify the content passed to import using bash (or whatever) scripting ?