cyrilgdn / terraform-provider-postgresql

Terraform PostgreSQL provider
https://www.terraform.io/docs/providers/postgresql/
Mozilla Public License 2.0
356 stars 181 forks source link

Refactor role params #355

Open Anton-Shutik opened 9 months ago

Anton-Shutik commented 9 months ago

Updated postgresql_role.

Now it supports postgres ROLE configuration params to accept string values. So you can do:

resource "postgresql_role" "role_with_configuration_parameters" {
    name = "role_with_configuration_parameters"
    statement_timeout = "2h"
    idle_in_transaction_session_timeout = "1d"
  }

Since now, 0 value is not a "placeholder", which will reset to system default value. 0 is a valid param value, which disables timeout (as for statement_timeout, idle_in_transaction_session_timeout )

Also, it is much easier to add new config params for role resource.

Fixes #353

Anton-Shutik commented 8 months ago

@cyrilgdn Would you mind taking a look, pls ?