From b68ef2c40bb8e2f205e1f3bcb5559deef7096337 Mon Sep 17 00:00:00 2001 From: Sean Chittenden Date: Mon, 5 Sep 2016 16:23:23 -0700 Subject: [PATCH] Fall through to using the defaults from github.com/lib/pq --- builtin/providers/postgresql/provider.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/providers/postgresql/provider.go b/builtin/providers/postgresql/provider.go index cbdc4a4e51..d644aa2a2a 100644 --- a/builtin/providers/postgresql/provider.go +++ b/builtin/providers/postgresql/provider.go @@ -12,19 +12,19 @@ func Provider() terraform.ResourceProvider { Schema: map[string]*schema.Schema{ "host": { Type: schema.TypeString, - Required: true, + Optional: true, DefaultFunc: schema.MultiEnvDefaultFunc([]string{"PGHOST", "POSTGRESQL_HOST"}, nil), Description: "The PostgreSQL server address", }, "port": { Type: schema.TypeInt, Optional: true, - Default: 5432, + DefaultFunc: schema.MultiEnvDefaultFunc([]string{"PGPORT"}, nil), Description: "The PostgreSQL server port", }, "username": { Type: schema.TypeString, - Required: true, + Optional: true, DefaultFunc: schema.MultiEnvDefaultFunc([]string{"PGUSER", "POSTGRESQL_USER"}, nil), Description: "Username for PostgreSQL server connection", },