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

Feature request: create non-admin database users with cockroach_sql_user #110

Open
shellderp opened this issue Apr 28, 2023 · 2 comments
Open

Comments

@shellderp
Copy link

Database users created through the provider are placed in the admin role and I haven't found a way to create a user that does not have this role.

One use case is creating readonly developer accounts for use with sso sql login. We would like to create a database user for a developer then grant them SELECT on all tables in a database, but no other privileges.

@marksoper
Copy link
Collaborator

@shellderp thanks Gersh. Role grant should cover this. Please let me know if not. https://github.com/cockroachdb/terraform-provider-cockroach/blob/main/docs/resources/user_role_grant.md

@shellderp
Copy link
Author

Thanks, role grant is a cockroach cloud role, I meant to create a SQL user that is not an admin then give specific grants to that user (eg SELECT on table), does it work for that as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants