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

Support for "type" object_type in `postgresql_grant` #378

Open adriansabas opened 7 months ago

adriansabas commented 7 months ago

Hi there,

I've noticed that not all postgresql object_types are supported inpostgresql_grant resource. As stated in documentation postgesql_grant doc "type" is not listed as available but on the other hand in postgresql_default_privileges resource, "type" is present.

I run into issue because TimescaleDB for postgre has it's own custom "rxid" type and i need to add access to it. When I tried to grant privilages for type regardless of it not being stated in documentationi had following error which was of course expected.

Error: expected object_type to be one of [database function procedure routine schema sequence table foreign_data_wrapper foreign_server column], got type

It would be great to have all postgresql database object types supported in postgresql_grant. Objects are listed in official postgre docs: grant postgre docs