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

feat: database role resource #1654

Merged
merged 8 commits into from
Apr 17, 2023
Merged

Conversation

mlorek
Copy link
Contributor

@mlorek mlorek commented Mar 24, 2023

row := snowflake.QueryRow(db, qry)
// FIXME scan for name as there is LIKE pattern syntax
databaseRole, err := snowflake.ScanDatabaseRole(row)
databaseRole.DatabaseName = database // Nasty.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not understanding what the point of this is. If database name is a ForceNew attribute then theres no reason to read or overwrite it at all since its never going to change.

)

type (
TestAccDatabaseRoleSettings struct {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this is a bit overkill. probably better to just have a function like databaseRoleConfig(warehouseName, databaseName, roleName)

@sfc-gh-swinkler
Copy link
Collaborator

@mlorek this is interesting an highlights a deficiency in the currently provider. we will also need to a snowflake_database_role_grant implemented as well, but that can be in a separate PR

@mlorek mlorek marked this pull request as ready for review April 13, 2023 14:23
@sfc-gh-swinkler sfc-gh-swinkler merged commit 9f4a516 into Snowflake-Labs:main Apr 17, 2023
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

Successfully merging this pull request may close these issues.

2 participants