Merge branch 'master' into mongodb-secret-backend

This commit is contained in:
Matt Hurne 2016-06-30 20:23:16 -04:00
commit 561e67ade8
5 changed files with 12 additions and 5 deletions

View File

@ -33,6 +33,7 @@ IMPROVEMENTS:
[GH-1567]
* credential/aws-ec2: Added a new constraint, 'bound_account_id' to the role
[GH-1523]
* physical/etcd: Support `ETCD_ADDR` env var for specifying addresses [GH-1576]
* secret/aws: Listing of roles is supported now [GH-1546]
* secret/mssql,mysql,postgresql: Reading of connection settings is supported
in all the sql backends [GH-1515]

View File

@ -89,6 +89,10 @@ func newEtcdBackend(conf map[string]string, logger *log.Logger) (Backend, error)
if address, ok := conf["address"]; ok {
machines = address
}
machinesEnv := os.Getenv("ETCD_ADDR")
if machinesEnv != "" {
machines = machinesEnv
}
machinesParsed := strings.Split(machines, EtcdMachineDelimiter)
// Verify that the machines are valid URLs

View File

@ -46,10 +46,11 @@ func TestEtcdBackend(t *testing.T) {
}
}()
// Generate new etcd backend. The etcd address is read from ETCD_ADDR. No
// need to provide it explicitly.
logger := log.New(os.Stderr, "", log.LstdFlags)
b, err := NewBackend("etcd", logger, map[string]string{
"address": addr,
"path": randPath,
"path": randPath,
})
if err != nil {
t.Fatalf("err: %s", err)

View File

@ -9,7 +9,7 @@ description: |-
# Environment variables
The Vault CLI will read the following environment variables to set
behavioral defaults. These can be overridden in all cases using
behavioral defaults. These can be overridden in all cases using
command-line arguments; see the command-line help for details.
The following table describes them:

View File

@ -331,7 +331,8 @@ For etcd, the following options are supported:
* `address` (optional) - The address(es) of the etcd instance(s) to talk to.
Can be comma separated list (protocol://host:port) of many etcd instances.
Defaults to "http://localhost:2379" if not specified.
Defaults to "http://localhost:2379" if not specified. May also be specified
via the ETCD_ADDR environment variable.
* `sync` (optional) - Should we synchronize the list of available etcd
servers on startup? This is a **string** value to allow for auto-sync to