From 0c1175f78b8a66100c05cb73f73e13a3b41fa157 Mon Sep 17 00:00:00 2001 From: pbthorste Date: Wed, 11 Jan 2017 22:45:30 +0100 Subject: [PATCH 1/2] set default postgres connection limit --- builtin/providers/postgresql/resource_postgresql_database.go | 1 + builtin/providers/postgresql/resource_postgresql_role.go | 1 + 2 files changed, 2 insertions(+) diff --git a/builtin/providers/postgresql/resource_postgresql_database.go b/builtin/providers/postgresql/resource_postgresql_database.go index ac5fa7760..2092d8cf2 100644 --- a/builtin/providers/postgresql/resource_postgresql_database.go +++ b/builtin/providers/postgresql/resource_postgresql_database.go @@ -87,6 +87,7 @@ func resourcePostgreSQLDatabase() *schema.Resource { Type: schema.TypeInt, Optional: true, Computed: true, + Default: -1, Description: "How many concurrent connections can be made to this database", ValidateFunc: validateConnLimit, }, diff --git a/builtin/providers/postgresql/resource_postgresql_role.go b/builtin/providers/postgresql/resource_postgresql_role.go index f501aafe4..586700e75 100644 --- a/builtin/providers/postgresql/resource_postgresql_role.go +++ b/builtin/providers/postgresql/resource_postgresql_role.go @@ -77,6 +77,7 @@ func resourcePostgreSQLRole() *schema.Resource { roleConnLimitAttr: { Type: schema.TypeInt, Optional: true, + Default: -1, Computed: true, Description: "How many concurrent connections can be made with this role", ValidateFunc: validateConnLimit, From 11f680a88e29ed9d6152743d4737bfb62d28e472 Mon Sep 17 00:00:00 2001 From: pbthorste Date: Wed, 11 Jan 2017 22:55:50 +0100 Subject: [PATCH 2/2] remove computed true for postgres connections --- builtin/providers/postgresql/resource_postgresql_database.go | 1 - builtin/providers/postgresql/resource_postgresql_role.go | 1 - 2 files changed, 2 deletions(-) diff --git a/builtin/providers/postgresql/resource_postgresql_database.go b/builtin/providers/postgresql/resource_postgresql_database.go index 2092d8cf2..d236b02d7 100644 --- a/builtin/providers/postgresql/resource_postgresql_database.go +++ b/builtin/providers/postgresql/resource_postgresql_database.go @@ -86,7 +86,6 @@ func resourcePostgreSQLDatabase() *schema.Resource { dbConnLimitAttr: { Type: schema.TypeInt, Optional: true, - Computed: true, Default: -1, Description: "How many concurrent connections can be made to this database", ValidateFunc: validateConnLimit, diff --git a/builtin/providers/postgresql/resource_postgresql_role.go b/builtin/providers/postgresql/resource_postgresql_role.go index 586700e75..3ac0b8a94 100644 --- a/builtin/providers/postgresql/resource_postgresql_role.go +++ b/builtin/providers/postgresql/resource_postgresql_role.go @@ -78,7 +78,6 @@ func resourcePostgreSQLRole() *schema.Resource { Type: schema.TypeInt, Optional: true, Default: -1, - Computed: true, Description: "How many concurrent connections can be made with this role", ValidateFunc: validateConnLimit, },