Fall through to using the defaults from github.com/lib/pq
This commit is contained in:
parent
f31ebff10e
commit
b68ef2c40b
|
@ -12,19 +12,19 @@ func Provider() terraform.ResourceProvider {
|
||||||
Schema: map[string]*schema.Schema{
|
Schema: map[string]*schema.Schema{
|
||||||
"host": {
|
"host": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Required: true,
|
Optional: true,
|
||||||
DefaultFunc: schema.MultiEnvDefaultFunc([]string{"PGHOST", "POSTGRESQL_HOST"}, nil),
|
DefaultFunc: schema.MultiEnvDefaultFunc([]string{"PGHOST", "POSTGRESQL_HOST"}, nil),
|
||||||
Description: "The PostgreSQL server address",
|
Description: "The PostgreSQL server address",
|
||||||
},
|
},
|
||||||
"port": {
|
"port": {
|
||||||
Type: schema.TypeInt,
|
Type: schema.TypeInt,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
Default: 5432,
|
DefaultFunc: schema.MultiEnvDefaultFunc([]string{"PGPORT"}, nil),
|
||||||
Description: "The PostgreSQL server port",
|
Description: "The PostgreSQL server port",
|
||||||
},
|
},
|
||||||
"username": {
|
"username": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Required: true,
|
Optional: true,
|
||||||
DefaultFunc: schema.MultiEnvDefaultFunc([]string{"PGUSER", "POSTGRESQL_USER"}, nil),
|
DefaultFunc: schema.MultiEnvDefaultFunc([]string{"PGUSER", "POSTGRESQL_USER"}, nil),
|
||||||
Description: "Username for PostgreSQL server connection",
|
Description: "Username for PostgreSQL server connection",
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue