terraform-provider-postgresql icon indicating copy to clipboard operation
terraform-provider-postgresql copied to clipboard

Add support for adding comments to PostgreSQL roles

Open kankou-aliaksei opened this issue 1 year ago • 1 comments

Summary

This PR adds support for attaching comments to PostgreSQL roles, allowing users to document the purpose of each role within the database. This improves clarity and supports compliance requirements.

Use Case

Teams managing PostgreSQL roles across environments can add comments to provide context or document role policies, aiding in audits and compliance.

Example

resource "postgresql_role" "my_role" {
  name     = "my_role"
  login    = true
  password = "mypass"
  comment  = "Role created for application access (JIRA: PROJ-1234)"
}

kankou-aliaksei avatar Sep 29 '24 15:09 kankou-aliaksei

Any chance of getting this moving?

david-heward-unmind avatar Nov 26 '24 12:11 david-heward-unmind

Hi @kankou-aliaksei, have you considered extending the comments support to more resources?

If I didn't overlooked anything, this is the intersection of the provider resources and postgresql objects supporting comment according to PostgreSQL docs:

  • database
  • extension
  • function
  • publication
  • role
  • schema
  • server
  • subscription

Here's a related issue #450

jindraj avatar Apr 23 '25 08:04 jindraj