Prefer PGHOSTADDR over PGHOST, if set.

This commit is contained in:
Sean Chittenden 2016-11-05 08:50:40 -07:00
parent 3779dfffa9
commit 55061d190a
No known key found for this signature in database
GPG Key ID: 4EBC9DC16C2E5E16

View File

@ -14,7 +14,7 @@ func Provider() terraform.ResourceProvider {
Type: schema.TypeString,
Optional: true,
// TODO(sean@): Remove POSTGRESQL_HOST in 0.8
DefaultFunc: schema.MultiEnvDefaultFunc([]string{"PGHOST", "POSTGRESQL_HOST"}, nil),
DefaultFunc: schema.MultiEnvDefaultFunc([]string{"PGHOSTADDR", "PGHOST", "POSTGRESQL_HOST"}, nil),
Description: "Name of PostgreSQL server address to connect to",
},
"port": {