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(cli): configure in non-interactive mode #158

Merged
merged 3 commits into from
Jul 6, 2020

Conversation

afiune
Copy link
Contributor

@afiune afiune commented Jul 6, 2020

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]

>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]>
@afiune afiune added feat New feature or request cli Something related to the Lacework CLI labels Jul 6, 2020
@afiune afiune requested a review from scottford-lw July 6, 2020 15:37
@afiune afiune self-assigned this Jul 6, 2020
Copy link
Contributor

@scottford-lw scottford-lw left a 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')

@afiune
Copy link
Contributor Author

afiune commented Jul 6, 2020

You tested that single case where it does NOT work! Amazing 🎉 thank you, fixing it now.

tenor-153515441

@afiune
Copy link
Contributor Author

afiune commented Jul 6, 2020

tenor-79052486

@afiune afiune force-pushed the afiune/configure/non-interactive branch from ec9a340 to 8333781 Compare July 6, 2020 18:29
Copy link
Contributor

@scottford-lw scottford-lw left a comment

Choose a reason for hiding this comment

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

@afiune afiune merged commit 781f65b into master Jul 6, 2020
@afiune afiune deleted the afiune/configure/non-interactive branch July 6, 2020 19:37
@afiune afiune mentioned this pull request Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Something related to the Lacework CLI feat New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configure the Lacework CLI in non-interactive mode
2 participants