Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for GRANT CREATE MODEL / GRANT EXECUTE ON MODEL #111

Open
yauhen-sobaleu opened this issue Feb 18, 2023 · 2 comments
Open

Add support for GRANT CREATE MODEL / GRANT EXECUTE ON MODEL #111

yauhen-sobaleu opened this issue Feb 18, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@yauhen-sobaleu
Copy link

Hello!

I would like to use Redshift provider to grant privileges for in-database machine learning.

GRANT CREATE MODEL
    TO { username [ WITH GRANT OPTION ] | ROLE role_name | GROUP group_name | PUBLIC } [, ...]

GRANT { EXECUTE | ALL [ PRIVILEGES ] }
    ON MODEL model_name [, ...]

    TO { username [ WITH GRANT OPTION ] | ROLE role_name | GROUP group_name | PUBLIC } [, ...]
@yauhen-sobaleu
Copy link
Author

If there is no time for this can you please give some hints on how I can add it myself? It should be straightforward since it's just a new resource.

@winglot
Copy link
Member

winglot commented Feb 22, 2023

Hi @yauhen-sobaleu
I'm currently lacking the capacity to do the implementation. If you wish to implement it on your own and submit a PR, take a look at the redshift_grant resource: https://github.com/brainly/terraform-provider-redshift/blob/master/redshift/resource_redshift_grant.go

It will have to be extended to support a new object type. Most parts are pretty simple except for constructing a query that will extract and parse the privileges from Redshift itself.

@winglot winglot added the enhancement New feature or request label Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants