creativeprojects/resticprofile

Environment variables from file

mjmeintjes opened this issue · 3 comments

I'd like to get the sensitive environment variables (like S3 keys) from a file instead of having them directly in the config file.

So similar to the password-file option, maybe have an env-file in addition to the current env option.

Yeah I suppose that shouldn't be difficult to implement 🤔

@creativeprojects , I'll take this one.

Had some thoughts about it last year. E.g. this feature should have the following parts:

  • Multiple env files support ( e.g. https://github.com/joho/godotenv )
  • Env file monitoring and reloading between run steps.
  • Template func to create a temporary env file (special case of {{ tempFile "filename" }}) that can be used in shell hooks to pass variables around (like in github actions).

... and for later maybe: re-evaluate profile if env changed. ... removed as not relevant for now. Can be supported just in an init step to support dynamic config file creation (e.g. for #156 ), this is however out of topic for this request.