Allow for username and password to be read from envvars.
This commit is contained in:
parent
8f7b315037
commit
6daf1d9d84
|
@ -25,14 +25,14 @@ func New() backend.Backend {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
Description: "Username used to connect to the etcd cluster.",
|
Description: "Username used to connect to the etcd cluster.",
|
||||||
Default: "", // To prevent input.
|
DefaultFunc: schema.EnvDefaultFunc("ETCDV3_USERNAME", ""),
|
||||||
},
|
},
|
||||||
|
|
||||||
"password": &schema.Schema{
|
"password": &schema.Schema{
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
Description: "Password used to connect to the etcd cluster.",
|
Description: "Password used to connect to the etcd cluster.",
|
||||||
Default: "", // To prevent input.
|
DefaultFunc: schema.EnvDefaultFunc("ETCDV3_PASSWORD", ""),
|
||||||
},
|
},
|
||||||
|
|
||||||
"prefix": &schema.Schema{
|
"prefix": &schema.Schema{
|
||||||
|
|
|
@ -47,7 +47,7 @@ data "terraform_remote_state" "foo" {
|
||||||
The following configuration options / environment variables are supported:
|
The following configuration options / environment variables are supported:
|
||||||
|
|
||||||
* `endpoints` - (Required) The list of 'etcd' endpoints which to connect to.
|
* `endpoints` - (Required) The list of 'etcd' endpoints which to connect to.
|
||||||
* `username` - (Optional) Username used to connect to the etcd cluster.
|
* `username` / `ETCDV3_USERNAME` - (Optional) Username used to connect to the etcd cluster.
|
||||||
* `password` - (Optional) Password used to connect to the etcd cluster.
|
* `password` / `ETCDV3_PASSWORD` - (Optional) Password used to connect to the etcd cluster.
|
||||||
* `prefix` - (Optional) An optional prefix to be added to keys when to storing state in etcd. Defaults to `""`.
|
* `prefix` - (Optional) An optional prefix to be added to keys when to storing state in etcd. Defaults to `""`.
|
||||||
* `lock` - (Optional) Whether to lock state access. Defaults to `true`.
|
* `lock` - (Optional) Whether to lock state access. Defaults to `true`.
|
||||||
|
|
Loading…
Reference in New Issue