postgresql
postgresql copied to clipboard
New resource to enable GRANT to add role access
:speaking_head: 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.
:grey_question: 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
:arrow_heading_up: Describe alternatives you've considered
Right now I have to call and run a sql file I created to do this instead.
:heavy_plus_sign: 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.