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

Feature Request - terrahelp config json #47

Open
LeoK80 opened this issue Mar 15, 2023 · 0 comments
Open

Feature Request - terrahelp config json #47

LeoK80 opened this issue Mar 15, 2023 · 0 comments

Comments

@LeoK80
Copy link

LeoK80 commented Mar 15, 2023

Feature
Instead of using the Env Vars to configure the Vault encryption, would it be possible to also support configuring TerraHelp with a configuration json file?

Context
Reason for the feature is that it would allow people to store their config in a json blob in Vault and output it into the expected json file format using the Vault cli client.
e.g. vault kv get secret/terrahelp | jq -r '.data.data' > th-config.json

with contents like

{
  "TH_ENCRYPTION_PROVIDER": "vault",
  "TH_ENCRYPTION_MODE": "full",
  "TH_VAULT_NAMED_KEY": "examplekey"
}

So you can run terrahelp vault-autoconfig and subsequent commands based on the provided json.
The Vault env vars presumably are already set in order to run vault kv get!

Of course if more than one Vault instances are used perhaps an override of VAULT_ADDR, VAULT_TOKEN and VAULT_SKIP_VERIFY (and VAULT_NAMESPACE for Enterprise Vault) could also still be useful as part of the config.json for TerraHelp.

Potentially default to specific filename and provide a -config-file= flag for alternate file naming of a config file.

Benefits

  • store/manage the Vault Named Key (and other key/value pairs) in Vault!
  • convenience of having full config available with simple one-liner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant