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

Programatic access to configured profile data #209

Closed
ghost opened this issue Sep 14, 2020 · 0 comments · Fixed by #225
Closed

Programatic access to configured profile data #209

ghost opened this issue Sep 14, 2020 · 0 comments · Fixed by #225
Assignees
Labels
feat New feature or request

Comments

@ghost
Copy link

ghost commented Sep 14, 2020

It would be great to have programatic access to the configuration settings for profiles, similar to what the AWS cli provides. This would make it easy to export the necessary environment variables for workflows that prefer it. Thinking something like:

lacework config get api_key --profile foo

Which would allow you to do something like this in a script or shell function to export them:

export LW_API_KEY="$(lacework configure get api_key --profile foo)"

Or maybe perhaps a more direct way to export the values to env variables:

lacework config env-export --profile foo

@afiune afiune self-assigned this Oct 5, 2020
@afiune afiune added the feat New feature or request label Oct 5, 2020
afiune added a commit that referenced this issue Oct 7, 2020
We are adding two new subcommands to the `lacework configure` command.

The `lacework configure list` command will list all profiles configured
into the configuration file `~/.lacework.toml`

The `lacework configure show <config_key>` command prints the current
computed configuration data from the specified configuration key. The
order of precedence to compute the configuration is flags, environment
variables, and the configuration file ~/.lacework.toml.

The available configuration keys are:
* `profile`
* `account`
* `api_secret`
* `api_key`

To show the configuration from a different profile, use the flag `--profile`
```
$ lacework configure show account --profile my-profile
```

Closes #209

Signed-off-by: Salim Afiune Maya <[email protected]>
afiune added a commit that referenced this issue Oct 7, 2020
We are adding two new subcommands to the `lacework configure` command.

The `lacework configure list` command will list all profiles configured
into the configuration file `~/.lacework.toml`

The `lacework configure show <config_key>` command prints the current
computed configuration data from the specified configuration key. The
order of precedence to compute the configuration is flags, environment
variables, and the configuration file ~/.lacework.toml.

The available configuration keys are:
* `profile`
* `account`
* `api_secret`
* `api_key`

To show the configuration from a different profile, use the flag `--profile`
```
$ lacework configure show account --profile my-profile
```

Closes #209

Signed-off-by: Salim Afiune Maya <[email protected]>
afiune added a commit that referenced this issue Oct 7, 2020
We are adding two new subcommands to the `lacework configure` command.

The `lacework configure list` command will list all profiles configured
into the configuration file `~/.lacework.toml`

The `lacework configure show <config_key>` command prints the current
computed configuration data from the specified configuration key. The
order of precedence to compute the configuration is flags, environment
variables, and the configuration file ~/.lacework.toml.

The available configuration keys are:
* `profile`
* `account`
* `api_secret`
* `api_key`

To show the configuration from a different profile, use the flag `--profile`
```
$ lacework configure show account --profile my-profile
```

Closes #209

Signed-off-by: Salim Afiune Maya <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant