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: add grant_database_role resource #2301

Merged
merged 10 commits into from Jan 18, 2024
Merged

feat: add grant_database_role resource #2301

merged 10 commits into from Jan 18, 2024

Conversation

sfc-gh-swinkler
Copy link
Collaborator

adds a new resource for granting database roles to roles , database roles or shares
https://docs.snowflake.com/en/sql-reference/sql/grant-database-role

Copy link

Integration tests success for 6d62617de00121dec047922f5bdf8fae143ce1a2

pkg/resources/grant_database_role.go Outdated Show resolved Hide resolved
pkg/resources/grant_database_role.go Show resolved Hide resolved
pkg/resources/grant_database_role_acceptance_test.go Outdated Show resolved Hide resolved
pkg/resources/grant_database_role_acceptance_test.go Outdated Show resolved Hide resolved
pkg/resources/grant_database_role_acceptance_test.go Outdated Show resolved Hide resolved
pkg/validation/validation.go Outdated Show resolved Hide resolved
pkg/validation/validation.go Outdated Show resolved Hide resolved
pkg/validation/validation.go Outdated Show resolved Hide resolved
@sakce
Copy link

sakce commented Jan 12, 2024

🎅 🎆

@sfc-gh-swinkler Is this PR still actively WIP?

Just curious when we could expect a release 0.84 to enable using database roles, as 0.83 has just released grant privileges to database role resource which is useless without being able to grant a database role :D

Copy link

Integration tests failure for ae8a77e82de84d37540ca2a65df30b1c8897cf0d

Copy link

Integration tests failure for 38ab8771e6375be7aa584d0cb8877f4da2e56b5f

Copy link

Integration tests failure for 548e85a83899941a68da7ddaaac4323fa6aeba59

Copy link

Integration tests failure for 52a513a643165800dc3f1892ec2386e3f2601496

"github.com/hashicorp/terraform-plugin-testing/tfversion"
)

func TestAcc_GrantDataseRole_databaseRole(t *testing.T) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Datase -> Database

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

})
}

func TestAcc_GrantDataseRole_accountRole(t *testing.T) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Datase -> Database

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed


/*
todo: once snowflake_grant_privileges_to_share is implemented. Cannot test this without having 'GRANT USAGE ON DATABASE <NAME> TO SHARE <share_name>',
func TestAcc_GrantDataseRole_share(t *testing.T) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Datase -> Database

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

@sfc-gh-swinkler sfc-gh-swinkler merged commit 2e7651f into main Jan 18, 2024
3 of 7 checks passed
@sfc-gh-swinkler sfc-gh-swinkler deleted the grant-db-role branch January 18, 2024 18:57
Copy link

Integration tests failure for df34e6479f73d292fab82fa6be21b6fa85727199

Copy link

Integration tests failure for 2156a9110492727fd42e297f1996123ba6f069b0

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.

None yet

4 participants