Allow Raft storage to be configured via env variables (#7745)

* Fix unordered imports

* Allow Raft node ID to be set via the environment variable `VAULT_RAFT_NODE_ID`

* Allow Raft path to be set via the environment variable `VAULT_RAFT_PATH`

* Prioritize the environment when fetching the Raft configuration values

Values in environment variables should override the config as per the
documentation as well as common sense.
This commit is contained in:
Daniel Lohse
2019-10-28 17:43:12 +01:00
committed by Brian Kassouf
parent efb76c0dfd
commit 00ef4e3281
2 changed files with 26 additions and 7 deletions

View File

@@ -44,7 +44,9 @@ cluster_addr = "http://127.0.0.1:8201"
- `path` `(string: "")` The file system path where all the Vault data gets
stored.
This value can be overridden by setting the `VAULT_RAFT_PATH` environment variable.
- `node_id` `(string: "")` - The identifier for the node in the Raft cluster.
This value can be overridden by setting the `VAULT_RAFT_NODE_ID` environment variable.
[raft]: https://raft.github.io/ "The Raft Consensus Algorithm"