From 2ecd42c0be7f641ca1d4ba81ea9b2c4c4a1de838 Mon Sep 17 00:00:00 2001 From: Sean Chittenden Date: Mon, 12 Dec 2016 15:21:00 -0800 Subject: [PATCH] Remove non-standard environment variables in prep for 0.8. --- builtin/providers/postgresql/provider.go | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/builtin/providers/postgresql/provider.go b/builtin/providers/postgresql/provider.go index d692ba2fb..2f7064447 100644 --- a/builtin/providers/postgresql/provider.go +++ b/builtin/providers/postgresql/provider.go @@ -14,10 +14,9 @@ func Provider() terraform.ResourceProvider { return &schema.Provider{ Schema: map[string]*schema.Schema{ "host": { - Type: schema.TypeString, - Optional: true, - // TODO(sean@): Remove POSTGRESQL_HOST in 0.8 - DefaultFunc: schema.MultiEnvDefaultFunc([]string{"PGHOST", "POSTGRESQL_HOST"}, nil), + Type: schema.TypeString, + Optional: true, + DefaultFunc: schema.EnvDefaultFunc("PGHOST", nil), Description: "Name of PostgreSQL server address to connect to", }, "port": { @@ -33,17 +32,15 @@ func Provider() terraform.ResourceProvider { DefaultFunc: schema.EnvDefaultFunc("PGDATABASE", "postgres"), }, "username": { - Type: schema.TypeString, - Optional: true, - // TODO(sean@): Remove POSTGRESQL_USER in 0.8 - DefaultFunc: schema.MultiEnvDefaultFunc([]string{"PGUSER", "POSTGRESQL_USER"}, "postgres"), + Type: schema.TypeString, + Optional: true, + DefaultFunc: schema.EnvDefaultFunc("PGUSER", "postgres"), Description: "PostgreSQL user name to connect as", }, "password": { - Type: schema.TypeString, - Optional: true, - // TODO(sean@): Remove POSTGRESQL_PASSWORD in 0.8 - DefaultFunc: schema.MultiEnvDefaultFunc([]string{"PGPASSWORD", "POSTGRESQL_PASSWORD"}, nil), + Type: schema.TypeString, + Optional: true, + DefaultFunc: schema.EnvDefaultFunc("PGPASSWORD", nil), Description: "Password to be used if the PostgreSQL server demands password authentication", }, "sslmode": {