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

Missing support for granting privileges on 'LARGE OBJECT'

Open sharebear opened this issue 2 years ago • 0 comments

Hi there,

Thank you for opening an issue. Please provide the following information:

Terraform Version

N/A

Affected Resource(s)

Please list the resources as a list, for example:

  • postgresql_grant
  • postgresql_default_privileges

Terraform Configuration Files

resource "postgresql_grant" "db_table_read_only_grant" {
  database    = "my_db"
  schema      = "my_schema"
  object_type = "large object"
  role        = "my_role"
  privileges  = ["SELECT"]
}

Debug Output

N/A

Panic Output

N/A

Expected Behavior

SELECT privilege for all LARGE OBJECTs in the schema my_schema should be granted to the role my_role

Actual Behavior

Error: expected object_type to be one of [database function schema sequence table foreign_data_wrapper foreign_server], got large object

Steps to Reproduce

  1. terraform validate

Important Factoids

Trying to create a role that can run pg_dump on a database containing large objects.

References

https://www.postgresql.org/docs/current/ddl-priv.html

sharebear avatar May 31 '22 08:05 sharebear