Skip to content
This repository has been archived by the owner on Nov 14, 2020. It is now read-only.

Ability to grant role membership to existing user #154

Open
mikkoc opened this issue Jul 2, 2020 · 3 comments · May be fixed by #189
Open

Ability to grant role membership to existing user #154

mikkoc opened this issue Jul 2, 2020 · 3 comments · May be fixed by #189

Comments

@mikkoc
Copy link

mikkoc commented Jul 2, 2020

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

@Vince-Chenal
Copy link
Contributor

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".

add-grant-role-resource

It's not finished yet but I would prefer to gather opinions before continuing

@k911
Copy link

k911 commented Aug 12, 2020

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.

@pacecreative
Copy link

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.

@dvdliao dvdliao linked a pull request Sep 26, 2020 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants