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

Feat: add Support of Terratag parameters through Environment Variable #176

Merged
merged 2 commits into from
May 9, 2023

Conversation

TomerHeber
Copy link
Collaborator

@TomerHeber TomerHeber commented May 8, 2023

resolves #174

  1. Added support for environment variables (cli has precedence over it).
  2. Added unit tests.
  3. Updated readme file.

@@ -48,6 +49,21 @@ func InitArgs() (Args, error) {
fs.StringVar(&args.Type, "type", string(common.Terraform), "The IAC type. Valid values: terraform or terragrunt")
fs.BoolVar(&args.Version, "version", false, "Prints the version")

// Set cli args based on environment variables.
//The command line flags have precedence over environment variables.
fs.VisitAll(func(f *flag.Flag) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really all the code...
The rest is testing etc...

@TomerHeber TomerHeber requested a review from yaronya May 8, 2023 18:22
Copy link

@chpl chpl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Support of Terratag parameters through Environment Variable
2 participants