From d499bd58e0f068bc0bc580ac725d267d1b398518 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Feb 2024 14:11:57 +0000 Subject: [PATCH] build(deps): bump github.com/aiven/go-api-schemas from 1.58.0 to 1.59.0 (#1584) --- docs/resources/pg.md | 14 +++--- go.mod | 2 +- go.sum | 4 +- .../userconfig/dist/service_types.go | 44 ++++++++++++------- internal/sdkprovider/userconfig/service/pg.go | 15 +++---- 5 files changed, 46 insertions(+), 33 deletions(-) diff --git a/docs/resources/pg.md b/docs/resources/pg.md index f833d6654..5d5b5ac69 100644 --- a/docs/resources/pg.md +++ b/docs/resources/pg.md @@ -251,15 +251,15 @@ Optional: Optional: -- `autodb_idle_timeout` (Number) If the automatically created database pools have been unused this many seconds, they are freed. If 0 then timeout is disabled. (seconds). +- `autodb_idle_timeout` (Number) If the automatically created database pools have been unused this many seconds, they are freed. If 0 then timeout is disabled. (seconds). The default value is `3600`. - `autodb_max_db_connections` (Number) Do not allow more than this many server connections per database (regardless of user). Setting it to 0 means unlimited. -- `autodb_pool_mode` (String) PGBouncer pool mode. -- `autodb_pool_size` (Number) If non-zero then create automatically a pool of that size per user when a pool doesn't exist. +- `autodb_pool_mode` (String) PGBouncer pool mode. The default value is `transaction`. +- `autodb_pool_size` (Number) If non-zero then create automatically a pool of that size per user when a pool doesn't exist. The default value is `0`. - `ignore_startup_parameters` (List of String) List of parameters to ignore when given in startup packet. -- `min_pool_size` (Number) Add more server connections to pool if below this number. Improves behavior when usual load comes suddenly back after period of total inactivity. The value is effectively capped at the pool size. -- `server_idle_timeout` (Number) If a server connection has been idle more than this many seconds it will be dropped. If 0 then timeout is disabled. (seconds). -- `server_lifetime` (Number) The pooler will close an unused server connection that has been connected longer than this. (seconds). -- `server_reset_query_always` (Boolean) Run server_reset_query (DISCARD ALL) in all pooling modes. +- `min_pool_size` (Number) Add more server connections to pool if below this number. Improves behavior when usual load comes suddenly back after period of total inactivity. The value is effectively capped at the pool size. The default value is `0`. +- `server_idle_timeout` (Number) If a server connection has been idle more than this many seconds it will be dropped. If 0 then timeout is disabled. (seconds). The default value is `600`. +- `server_lifetime` (Number) The pooler will close an unused server connection that has been connected longer than this. (seconds). The default value is `3600`. +- `server_reset_query_always` (Boolean) Run server_reset_query (DISCARD ALL) in all pooling modes. The default value is `false`. diff --git a/go.mod b/go.mod index f653a5aaa..563565bc7 100644 --- a/go.mod +++ b/go.mod @@ -47,7 +47,7 @@ require ( cloud.google.com/go v0.110.10 // indirect cloud.google.com/go/storage v1.30.1 // indirect github.com/agext/levenshtein v1.2.3 // indirect - github.com/aiven/go-api-schemas v1.58.0 + github.com/aiven/go-api-schemas v1.59.0 github.com/aws/aws-sdk-go v1.44.122 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/davecgh/go-spew v1.1.1 // indirect diff --git a/go.sum b/go.sum index 3d6e4023b..0a7d9c002 100644 --- a/go.sum +++ b/go.sum @@ -199,8 +199,8 @@ github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7l github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/aiven/aiven-go-client/v2 v2.12.0 h1:VxOfn61AtfLjy2B+DdXF2/7OHyyFZ1aQaIlE3TOyIsE= github.com/aiven/aiven-go-client/v2 v2.12.0/go.mod h1:x0xhzxWEKAwKv0xY5FvECiI6tesWshcPHvjwl0B/1SU= -github.com/aiven/go-api-schemas v1.58.0 h1:+82F7/PJs3EMJsP2Zd/+jI42vdp92ZuYBsVi3skfDlY= -github.com/aiven/go-api-schemas v1.58.0/go.mod h1:/bPxBUHza/2Aeer6hIIdB++GxKiw9K1KCBtRa2rtZ5I= +github.com/aiven/go-api-schemas v1.59.0 h1:DEH5KuxCpdtIxcnBubwf/svjExE1KK3DbQHT+tb5aeU= +github.com/aiven/go-api-schemas v1.59.0/go.mod h1:/bPxBUHza/2Aeer6hIIdB++GxKiw9K1KCBtRa2rtZ5I= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= diff --git a/internal/schemautil/userconfig/dist/service_types.go b/internal/schemautil/userconfig/dist/service_types.go index 394c69f8b..8a93d179d 100644 --- a/internal/schemautil/userconfig/dist/service_types.go +++ b/internal/schemautil/userconfig/dist/service_types.go @@ -8110,10 +8110,11 @@ func ServiceTypePg() *schema.Schema { Type: schema.TypeString, }, "pgbouncer": { - Description: "PGBouncer connection pooling settings.", + Description: "System-wide settings for pgbouncer.", DiffSuppressFunc: schemautil.EmptyObjectDiffSuppressFuncSkipArrays(map[string]*schema.Schema{ "autodb_idle_timeout": { - Description: "If the automatically created database pools have been unused this many seconds, they are freed. If 0 then timeout is disabled. (seconds).", + Default: "3600", + Description: "If the automatically created database pools have been unused this many seconds, they are freed. If 0 then timeout is disabled. (seconds). The default value is `3600`.", Optional: true, Type: schema.TypeInt, }, @@ -8123,12 +8124,14 @@ func ServiceTypePg() *schema.Schema { Type: schema.TypeInt, }, "autodb_pool_mode": { - Description: "PGBouncer pool mode.", + Default: "transaction", + Description: "PGBouncer pool mode. The default value is `transaction`.", Optional: true, Type: schema.TypeString, }, "autodb_pool_size": { - Description: "If non-zero then create automatically a pool of that size per user when a pool doesn't exist.", + Default: "0", + Description: "If non-zero then create automatically a pool of that size per user when a pool doesn't exist. The default value is `0`.", Optional: true, Type: schema.TypeInt, }, @@ -8140,29 +8143,34 @@ func ServiceTypePg() *schema.Schema { Type: schema.TypeList, }, "min_pool_size": { - Description: "Add more server connections to pool if below this number. Improves behavior when usual load comes suddenly back after period of total inactivity. The value is effectively capped at the pool size.", + Default: "0", + Description: "Add more server connections to pool if below this number. Improves behavior when usual load comes suddenly back after period of total inactivity. The value is effectively capped at the pool size. The default value is `0`.", Optional: true, Type: schema.TypeInt, }, "server_idle_timeout": { - Description: "If a server connection has been idle more than this many seconds it will be dropped. If 0 then timeout is disabled. (seconds).", + Default: "600", + Description: "If a server connection has been idle more than this many seconds it will be dropped. If 0 then timeout is disabled. (seconds). The default value is `600`.", Optional: true, Type: schema.TypeInt, }, "server_lifetime": { - Description: "The pooler will close an unused server connection that has been connected longer than this. (seconds).", + Default: "3600", + Description: "The pooler will close an unused server connection that has been connected longer than this. (seconds). The default value is `3600`.", Optional: true, Type: schema.TypeInt, }, "server_reset_query_always": { - Description: "Run server_reset_query (DISCARD ALL) in all pooling modes.", + Default: false, + Description: "Run server_reset_query (DISCARD ALL) in all pooling modes. The default value is `false`.", Optional: true, Type: schema.TypeBool, }, }), Elem: &schema.Resource{Schema: map[string]*schema.Schema{ "autodb_idle_timeout": { - Description: "If the automatically created database pools have been unused this many seconds, they are freed. If 0 then timeout is disabled. (seconds).", + Default: "3600", + Description: "If the automatically created database pools have been unused this many seconds, they are freed. If 0 then timeout is disabled. (seconds). The default value is `3600`.", Optional: true, Type: schema.TypeInt, }, @@ -8172,12 +8180,14 @@ func ServiceTypePg() *schema.Schema { Type: schema.TypeInt, }, "autodb_pool_mode": { - Description: "PGBouncer pool mode.", + Default: "transaction", + Description: "PGBouncer pool mode. The default value is `transaction`.", Optional: true, Type: schema.TypeString, }, "autodb_pool_size": { - Description: "If non-zero then create automatically a pool of that size per user when a pool doesn't exist.", + Default: "0", + Description: "If non-zero then create automatically a pool of that size per user when a pool doesn't exist. The default value is `0`.", Optional: true, Type: schema.TypeInt, }, @@ -8189,22 +8199,26 @@ func ServiceTypePg() *schema.Schema { Type: schema.TypeList, }, "min_pool_size": { - Description: "Add more server connections to pool if below this number. Improves behavior when usual load comes suddenly back after period of total inactivity. The value is effectively capped at the pool size.", + Default: "0", + Description: "Add more server connections to pool if below this number. Improves behavior when usual load comes suddenly back after period of total inactivity. The value is effectively capped at the pool size. The default value is `0`.", Optional: true, Type: schema.TypeInt, }, "server_idle_timeout": { - Description: "If a server connection has been idle more than this many seconds it will be dropped. If 0 then timeout is disabled. (seconds).", + Default: "600", + Description: "If a server connection has been idle more than this many seconds it will be dropped. If 0 then timeout is disabled. (seconds). The default value is `600`.", Optional: true, Type: schema.TypeInt, }, "server_lifetime": { - Description: "The pooler will close an unused server connection that has been connected longer than this. (seconds).", + Default: "3600", + Description: "The pooler will close an unused server connection that has been connected longer than this. (seconds). The default value is `3600`.", Optional: true, Type: schema.TypeInt, }, "server_reset_query_always": { - Description: "Run server_reset_query (DISCARD ALL) in all pooling modes.", + Default: false, + Description: "Run server_reset_query (DISCARD ALL) in all pooling modes. The default value is `false`.", Optional: true, Type: schema.TypeBool, }, diff --git a/internal/sdkprovider/userconfig/service/pg.go b/internal/sdkprovider/userconfig/service/pg.go index 83f5a94b5..117185477 100644 --- a/internal/sdkprovider/userconfig/service/pg.go +++ b/internal/sdkprovider/userconfig/service/pg.go @@ -466,7 +466,7 @@ func pgUserConfig() *schema.Schema { Description: "PGBouncer connection pooling settings", Elem: &schema.Resource{Schema: map[string]*schema.Schema{ "autodb_idle_timeout": { - Description: "If the automatically created database pools have been unused this many seconds, they are freed. If 0 then timeout is disabled. (seconds).", + Description: "If the automatically created database pools have been unused this many seconds, they are freed. If 0 then timeout is disabled. (seconds). The default value is `3600`.", Optional: true, Type: schema.TypeInt, }, @@ -476,20 +476,19 @@ func pgUserConfig() *schema.Schema { Type: schema.TypeInt, }, "autodb_pool_mode": { - Description: "PGBouncer pool mode.", + Description: "PGBouncer pool mode. The default value is `transaction`.", Optional: true, Type: schema.TypeString, ValidateFunc: validation.StringInSlice([]string{"session", "transaction", "statement"}, false), }, "autodb_pool_size": { - Description: "If non-zero then create automatically a pool of that size per user when a pool doesn't exist.", + Description: "If non-zero then create automatically a pool of that size per user when a pool doesn't exist. The default value is `0`.", Optional: true, Type: schema.TypeInt, }, "ignore_startup_parameters": { Description: "List of parameters to ignore when given in startup packet.", Elem: &schema.Schema{ - Description: "Enum of parameters to ignore when given in startup packet.", Type: schema.TypeString, ValidateFunc: validation.StringInSlice([]string{"extra_float_digits", "search_path"}, false), }, @@ -498,22 +497,22 @@ func pgUserConfig() *schema.Schema { Type: schema.TypeList, }, "min_pool_size": { - Description: "Add more server connections to pool if below this number. Improves behavior when usual load comes suddenly back after period of total inactivity. The value is effectively capped at the pool size.", + Description: "Add more server connections to pool if below this number. Improves behavior when usual load comes suddenly back after period of total inactivity. The value is effectively capped at the pool size. The default value is `0`.", Optional: true, Type: schema.TypeInt, }, "server_idle_timeout": { - Description: "If a server connection has been idle more than this many seconds it will be dropped. If 0 then timeout is disabled. (seconds).", + Description: "If a server connection has been idle more than this many seconds it will be dropped. If 0 then timeout is disabled. (seconds). The default value is `600`.", Optional: true, Type: schema.TypeInt, }, "server_lifetime": { - Description: "The pooler will close an unused server connection that has been connected longer than this. (seconds).", + Description: "The pooler will close an unused server connection that has been connected longer than this. (seconds). The default value is `3600`.", Optional: true, Type: schema.TypeInt, }, "server_reset_query_always": { - Description: "Run server_reset_query (DISCARD ALL) in all pooling modes.", + Description: "Run server_reset_query (DISCARD ALL) in all pooling modes. The default value is `false`.", Optional: true, Type: schema.TypeBool, },