Add database URL. (#365)
* Add database URL. This allows specification of either a file://, env://, or other string. If it starts with file:// or env:// the actual value will be read from those resources. * Tidy up the KMS output * Also run migrations in test mode when specifying the URL
This commit is contained in:
1 parent
c2b49dbc7d
commit
c4e2b88022
5 files changed
+83
-7
No files matched your search
@@ -349,7 +349,10 @@ func (b *Server) SetupKMSes(ui cli.Ui, config *config.Config) error {
|
||||
|
||||
kmsLogger := b.Logger.ResetNamed(fmt.Sprintf("kms-%s-%s", purpose, kms.Type))
|
||||
|
||||
origPurpose := kms.Purpose
|
||||
kms.Purpose = []string{purpose}
|
||||
wrapper, wrapperConfigError := configutil.ConfigureWrapper(kms, &b.InfoKeys, &b.Info, kmsLogger)
|
||||
kms.Purpose = origPurpose
|
||||
if wrapperConfigError != nil {
|
||||
if !errwrap.ContainsType(wrapperConfigError, new(logical.KeyNotFoundError)) {
|
||||
return fmt.Errorf(
|
||||
|
||||
Reference in new issue
Block a user