Open mikkoc opened 4 years ago
Hello, I started to write something to support this but I don't really know if I chose the good way.
Can anyone have a look at this branch I have ? The idea is to create a new resource "grant_role".
It's not finished yet but I would prefer to gather opinions before continuing
We've also encountered this issue while trying to manage RDS db via postgres provider. RDS master user is created and managed by AWS. @Vince-Chenal personally, I really like the idea.
This would be incredibly helpful as this is the only step remaining that I need to be able to implement terraform with our postgresql instance.
Is there a way to grant role membership to an existing user that is not created by Terraform?
I cannot seem to find any.
To be clear, I'd like to run something like this:
GRANT admins TO joe;
via Terraform. But this resource: https://www.terraform.io/docs/providers/postgresql/r/postgresql_grant.html seems focused only on Databases.
The user in question is the RDS master user, which is created automatically by RDS: we cannot create it in Terraform.
Thanks