postgresql icon indicating copy to clipboard operation
postgresql copied to clipboard

New resource to enable GRANT to add role access

Open louraz opened this issue 5 years ago • 1 comments

: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 avatar Oct 27 '20 20:10 louraz

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

ramereth avatar Oct 28 '20 16:10 ramereth