sst / ion

❍ — a new engine for SST
https://ion.sst.dev
MIT License
1.09k stars 129 forks source link

Cloudflare apiToken as Secret & Allow to execute `sst secret set` without running sst.config.ts #377

Open webdeb opened 1 month ago

webdeb commented 1 month ago
  1. It would be convenient to provide the Cloudflare Api Token as Secret, but its not possible because the app(input) function should not use sst Ressources, so its unclear how to deal with it, other then providing those values through the cli.

  2. problem is when you try to set secret and you have for example cloudflare configured as a second provider, sst tries to load the config and you have to pass environment variables to authenticate cloudflare. But you only want to set a secret on a stage, nothing more. This should be more or less unrelated, as far as I understand it only requires the static configuration of sst.config.ts like name, home etc.

thdxr commented 1 month ago

yeah this is a good point - let me see if we can do less

thdxr commented 1 month ago

although for your first question - you should not be using sst.Secrets for provider values - there's too many weird situations that creates if we tried to make that work

those should be provided through normal env variables

webdeb commented 1 month ago

should be provided through normal env variables

👌 yeah I've found it later, and then the 2nd issue is not painful anymore. After solved that I stumbled over the forced CamelCase issue #378 , which hurts much more, had then written a custom script to parse camelize and set env vars.