-
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
Programatic access to configured profile data #209
Labels
feat
New feature or request
Comments
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
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
The text was updated successfully, but these errors were encountered: