This repository was archived by the owner on Nov 14, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 78
Temporarily add role membership when managing permissions #70
Comments
If anyone has this in progress please mention me, if not I will try to submit PR this week |
@zytek Thanks, for opening the issue.
True ! And if you give it a try, note that I already had to do something similar here: https://github.com/terraform-providers/terraform-provider-postgresql/blob/master/postgresql/resource_postgresql_database.go#L132-L142 |
zytek
added a commit
to zytek/terraform-provider-postgresql
that referenced
this issue
Apr 2, 2019
Make sure connected user has proper permissions to manage default privileges. Fixed hashicorp#70 Signed-off-by: Jakub Paweł Głazik <[email protected]>
cyrilgdn
referenced
this issue
in cyrilgdn/terraform-provider-postgresql
Jul 3, 2019
Make sure connected user has proper permissions to manage default privileges. Fixed #70 Signed-off-by: Jakub Paweł Głazik <[email protected]>
cyrilgdn
pushed a commit
that referenced
this issue
Aug 2, 2019
…#71) * Update resource description in line with PostgreSQL docs Signed-off-by: Jakub Paweł Głazik <[email protected]> * Grant owner role to connected user Make sure connected user has proper permissions to manage default privileges. Fixed #70 Signed-off-by: Jakub Paweł Głazik <[email protected]> * default privileges: grant & revoke the owner in the transaction. So in this way this temporary grant is not even seen outside the transaction. This also adds a test to verify that owner is correctly revoked.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add
GRANT $owner TO $connected_user
when managing permissions.Notice: we should probably remove this grant afterward to not leak permissions BUT only if it wasn't granted before we did it/checked for it. So, as far as I understand, provider should check if this membership is added, add it if not and later remove it.
Mentioned in #53
Related hashicorp/terraform#11452
The text was updated successfully, but these errors were encountered: