-
Notifications
You must be signed in to change notification settings - Fork 393
Description
I was wondering if there was interest in supporting an emerging pattern in the container world:
As an alternative to passing sensitive information via environment variables, _FILE may be appended to the previously listed environment variables, causing the initialization script to load the values for those variables from files present in the container.
For example, the POSTGRES_PASSWORD
environment variable can also be sourced from a file, where POSTGRES_PASSWORD_FILE
provides the path to the file. This pattern is very useful when you are targeting kubernetes and swarm environments, that provide the ability to source secrets from a mounted file.
This could be supported with an optional tag:
type Specification struct {
Password string `envconfig:"POSTGRES_PASSWORD", file:"true"`
}
I would be open to sending a pull request, if there was interest in this capability.