Skip to content

postgresql_default_privileges and postgresql_grant #226

Answered by cyrilgdn
johnB96 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,

postgresql_grant needs to exist only if you want to be always sure that existing tables has the right privileges.

If you define the postgresql_default_privileges at database creation, all the created tables after that will have the required permissions, as soon as nobody can/will manually change them. If some tables exist when defining postgresql_default_privileges but you want to avoid having postgresql_grant resource, you could also manually fixed permissions of existing tables.

However, in my team we defined both in a Terraform module (that manages a whole database) so we are sure that potential manual modifications will be fixed in next Terraform apply and that all the tables h…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by johnB96
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants