Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add environment variable for all flags and envvar prefix #42

Merged
merged 2 commits into from
May 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,23 @@ func main() {
Name: "log-format, l",
Usage: "select logrus formatter ['json', 'text']",
Value: "text",
EnvVars: []string{"LOG_FORMAT"},
EnvVars: []string{"SECRETS_INIT_LOG_FORMAT", "LOG_FORMAT"},
},
&cli.StringFlag{
Name: "provider, p",
Usage: "supported secrets manager provider ['aws', 'google']",
Value: "aws",
EnvVars: []string{"SECRETS_INIT_SECRETS_PROVIDER"}
alexei-led marked this conversation as resolved.
Show resolved Hide resolved
},
&cli.BoolFlag{
Name: "exit-early",
Usage: "exit when a provider fails or a secret is not found",
EnvVars: []string{"EXIT_EARLY"},
EnvVars: []string{"SECRETS_INIT_EXIT_EARLY", "EXIT_EARLY"},
},
&cli.StringFlag{
Name: "google-project",
Usage: "the google cloud project for secrets without a project prefix",
EnvVars: []string{"SECRETS_INIT_GOOGLE_PROJECT"}
alexei-led marked this conversation as resolved.
Show resolved Hide resolved
},
},
Commands: []*cli.Command{
Expand Down