From 886f873ffcf0445c403205a57b48f2b2ff5d2d2a Mon Sep 17 00:00:00 2001 From: Brian Kassouf Date: Thu, 4 May 2017 11:45:27 -0700 Subject: [PATCH] Update docs and return a better error message --- builtin/logical/database/backend.go | 2 +- website/source/api/secret/databases/index.html.md | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/builtin/logical/database/backend.go b/builtin/logical/database/backend.go index 3d15028051..91b92e438a 100644 --- a/builtin/logical/database/backend.go +++ b/builtin/logical/database/backend.go @@ -106,7 +106,7 @@ func (b *databaseBackend) createDBObj(s logical.Storage, name string) (dbplugin. func (b *databaseBackend) DatabaseConfig(s logical.Storage, name string) (*DatabaseConfig, error) { entry, err := s.Get(fmt.Sprintf("config/%s", name)) if err != nil { - return nil, fmt.Errorf("failed to read connection configuration with name: %s", name) + return nil, fmt.Errorf("failed to read connection configuration: %s", err) } if entry == nil { return nil, fmt.Errorf("failed to find entry for connection with name: %s", name) diff --git a/website/source/api/secret/databases/index.html.md b/website/source/api/secret/databases/index.html.md index f55998aceb..d43e49789a 100644 --- a/website/source/api/secret/databases/index.html.md +++ b/website/source/api/secret/databases/index.html.md @@ -162,11 +162,13 @@ This endpoint creates or updates a role definition. - `db_name` `(string: )` - The name of the database connection to use for this role. -- `default_ttl` `(string: )` - Specifies the TTL for the lease - associated with this role. +- `default_ttl` `(string/int: 0)` - Specifies the TTL for the leases + associated with this role. Accepts time suffixed strings ("1h") or an integer + number of seconds. Defaults to system/backend default TTL time. -- `max_ttl` `(string: )` - Specifies the maximum TTL for the lease - associated with this role. +- `max_ttl` `(string/int: 0)` - Specifies the maximum TTL for the leases + associated with this role. Accepts time suffixed strings ("1h") or an integer + number of seconds. Defaults to system/backend default TTL time. - `creation_statements` `(string: )` – Specifies the database statements executed to create and configure a user. Must be a