Skip to content

Commit

Permalink
Merge pull request #42 from albertrdixon/albertrdixon/flag-env-vars
Browse files Browse the repository at this point in the history
Add environment variable for all flags and envvar prefix
  • Loading branch information
alexei-led authored May 27, 2024
2 parents 034b929 + 984ce66 commit 32e483b
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 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",
Name: "provider, p",
Usage: "supported secrets manager provider ['aws', 'google']",
Value: "aws",
EnvVars: []string{"SECRETS_INIT_SECRETS_PROVIDER", "SECRETS_PROVIDER"},
},
&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",
Name: "google-project",
Usage: "the google cloud project for secrets without a project prefix",
EnvVars: []string{"SECRETS_INIT_GOOGLE_PROJECT", "GOOGLE_PROJECT"},
},
&cli.BoolFlag{
Name: "interactive",
Expand Down

0 comments on commit 32e483b

Please sign in to comment.