feat(config): Support multiple files This updates the three subcommands that take a `-config` flag to to support multiple config files via a repeated `-config` flag. It updates the following subcommands: - `server` - `database init` - `database migrate` Note that the multiple file support only works if all config files are HCL, not JSON. Also note that the config files are concatenated together. There is no attempt to merge config files, so having the same stanza in multiple files can yield unexpected results, with only one of the stanzas being used. When used with these limitations understood, this provides a way to take different actions for different kinds of dynamic configuration changes. An example would be when using consul-template to render the configuration files for boundary. With the multi file support consul-template can render one config file for the controller stanza, and provide boundary with a dynamic database credential via vault. Then when the credential is rotated, consul-template can send boundary a SIGHUP to switch to the new credential without a restart. A separate template could be used to render a config for a stanza that does not support SIGHUP, such as the events stanza that gets its values via consul's KV. If these values change, consul-template can restart boundary so the new configuration is used. Co-authored-by: Timothy Messier <tim.messier@gmail.com> Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
29 lines
749 B
JSON
29 lines
749 B
JSON
{
|
|
"kms": [
|
|
{
|
|
"aead": {
|
|
"aead_type": "aes-gcm",
|
|
"key": "sP1fnF5Xz85RrXyELHFeZg9Ad2qt4Z4bgNHVGtD6ung=",
|
|
"key_id": "global_root",
|
|
"purpose": "root"
|
|
}
|
|
},
|
|
{
|
|
"aead": {
|
|
"aead_type": "aes-gcm",
|
|
"key": "8fZBjCUfN0TzjEGLQldGY4+iE9AkOvCfjh7+p0GtRBQ=",
|
|
"key_id": "global_worker-auth",
|
|
"purpose": "worker-auth"
|
|
}
|
|
},
|
|
{
|
|
"aead": {
|
|
"aead_type": "aes-gcm",
|
|
"key": "8fZBjCUfN0TzjEGLQldGY4+iE9AkOvCfjh7+p0GtRBQ=",
|
|
"key_id": "global_recovery",
|
|
"purpose": "recovery"
|
|
}
|
|
}
|
|
]
|
|
}
|