-
Notifications
You must be signed in to change notification settings - Fork 25
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(cli): configure in non-interactive mode #158
Conversation
>As a Lacework CLI user that uses the tool in CI/CD Pipelines, >I want to have a non-interactive way to configure the Lacework CLI, >So I don't have to manually create the config file `~/.lacework.toml` inside my pipeline. When a user runs: ``` $ lacework configure -a foo -k bar -s bubu --noninteractive ``` The result is the creation of the `~/.lacework.toml` without asking the user to validate the inputs. (non-interactive mode) The command loads these settings from all sources, as usual, environment variables, parameters (including `--json_file`), and the actual config file. Closes #112 Signed-off-by: Salim Afiune Maya <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@afiune First of all, --noninteractive
did not seem to work with lacework configure
...
I was still prompted to accept my input...
lacework configure -a foo -k TECHALLY_561DDEAD5CC413252FD1D579EAD9C2B882B694872291FOO -s _TEST********* --noninteractive scottford@scott-fords-mbp
▸ Account: foo
▸ Access Key ID: TECHALLY_561DDEAD5CC413252FD1D579EAD9C2B882B694872291FOO
▸ Secret Access Key: (*****************************bFOO)
You are all set!
Second, if we are going to introduce a --noninteractive
flag for configure
we will need to update the --help
because there is already a --noninteractive
global flag and our help says it is disable interactive progress bars (i.e. 'spinners')
Signed-off-by: Salim Afiune Maya <[email protected]>
Signed-off-by: Salim Afiune Maya <[email protected]>
ec9a340
to
8333781
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a user runs:
The result is the creation of the
~/.lacework.toml
without asking the userto validate the inputs. (non-interactive mode)
The command loads these settings from all sources, as usual, environment
variables, parameters (including
--json_file
), and the actual config file.Closes #112
Signed-off-by: Salim Afiune Maya [email protected]