sous-chefs / postgresql

Development repository for the postgresql cookbook

Home Page:https://supermarket.chef.io/cookbooks/postgresql

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New resource to enable GRANT to add role access

louraz opened this issue · comments

🗣️ Foreword

I could not find a way using this cookbook to replicate the GRANT function to assign roles.

:person_frowning: Problem Statement

There isn't a way to assign roles to users/roles.

❔ Possible Solution

Update the postgresql_user :add and :create actions to take a new property 'in_role'.
Should effectively run the command
GRANT newrole TO user

⤴️ Describe alternatives you've considered

Right now I have to call and run a sql file I created to do this instead.

➕ Additional context

If I missed how to do this, please let me know.

@louraz please feel free to create a PR which addresses this! We'll review and hopefully get it merged and released.