Feature request: environement variable extrapolation in configuration
Hi 👋🏼
Would it be possible to add environment variables extrapolation support in the config file?
Due to security, I avoid having credentials stored in a clear text file and often rely on a password manager (gopass, 1password, bitwarden...).
To have some security as well as some flexibility, I would love to be able to write a profile with this kind of syntax:
```toml
[profiles.my-db]
adapter = "postgres"
host = "{env.MY_DB_HOST}"
user = "{env.MY_DB_USER}"
password = "{env.MY_DB_PASSSWORD}"
dbname = "{env.MY_DB_NAME}"
```
Or using pyproject.toml
```toml
[tool.harlequin.profiles.my-db]
adapter = "postgres"
host = "{env.MY_DB_HOST}"
user = "{env.MY_DB_USER}"
password = "{env.MY_DB_PASSSWORD}"
dbname = "{env.MY_DB_NAME}"
```
It would help with password managers but also when having DB access stored in a `.env` file, which can be automatically loaded.
I don't have any preference for the syntax; it could also be `{env:VAR}` or whatever.
Does it seem acceptable to you? Would you accept a pull request for it?
2 条评论