Capitalization of secrets

The title sounds intriguing, I know. But I’m merely requesting that fly secret set THIS_var does not force capitalization to THIS_VAR on the instances. The reason: some Docker images like this one depend on this capitalization to function correctly.

Also, the CLI behavior is slightly confusing:

$ fly secrets unset PDNS_api_key
Error No change detected to secrets

$ fly secrets list
NAME                          DIGEST                           DATE
PDNS_api_key                  827ccb0eea8a706c4c34a16891f84e7b 2021-05-31T17:08:15Z

$ fly secrets unset PDNS_API_KEY
Release v16 created

I agree. We upcased everything at some point to prevent user errors. Some apps do use case-sensitive environment variables though.

We have an upcoming feature to list current env for an app (including redacted secrets names). Meaning this will be easier to debug.

I’m looking into fixing this right now. Will also consult the team :slight_smile:

I’ve just deployed a fix for this. Feel free to give it a shot!

Just got bitten by this. When I fly list secrets, the secret’s name is in lowercase, exactly as I typed it in. If I ssh into a running instance, I can see the env var for the secret is in uppercase.

I’ve deployed a change that will (unfortunately) upcase all secrets in our database so as to not break older deploys.

I’ve found where we were still upcasing secret names. The fix has been rolled out, can you try setting a new secret and seeing if the case is preserved?

Works correctly now, thanks!