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 snowflake grant privileges to account role #2365

Merged
merged 11 commits into from Jan 25, 2024

Conversation

sfc-gh-jcieslak
Copy link
Collaborator

@sfc-gh-jcieslak sfc-gh-jcieslak commented Jan 17, 2024

"Refactor" of the snowflake_grant_privileges_to_role:

  • rename to snowflake_grant_privileges_to_account_role
  • new identifier
  • documentation for the new resource
  • always_apply flag
  • validation change in the new resource (according to the spec)

Test Plan

  • unit tests for the new identifier
  • acceptance tests for the new snowflake_grant_privileges_to_account_role

TODO

  • Write a migration guide for the new resource as well as guidance on how to migrate from old grant resources and how to specify identifiers in the new ones. Why new resource (name conv + new internal identifier).
  • Handle IMPORTED PRIVILEGES and on_all PIPES cases

@sfc-gh-jcieslak sfc-gh-jcieslak force-pushed the refactor-snowflake-grant-privileges-to-role branch from 3155c2f to 3781e26 Compare January 17, 2024 15:57
Copy link

Integration tests failure for 3781e2637c761751b46ab1023b3f833e2e1bb2ce

Copy link

Integration tests failure for f035eb3133a3c7c86483e7aa1b23052012148626

@sfc-gh-jcieslak sfc-gh-jcieslak marked this pull request as ready for review January 17, 2024 17:49
Copy link

Integration tests failure for 94eec211a0b5e95cde077020edf9f51eb7f29f94

privileges = ["CREATE DATABASE", "CREATE USER"]
role_name = snowflake_role.db_role.name
on_account = true
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe we can also put what the sample ID would be for the resource here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Id examples added under configurations

pkg/resources/grant_privileges_to_account_role.go Outdated Show resolved Hide resolved
pkg/resources/grant_privileges_to_account_role.go Outdated Show resolved Hide resolved
@sfc-gh-jcieslak sfc-gh-jcieslak force-pushed the refactor-snowflake-grant-privileges-to-role branch 2 times, most recently from 77f46c2 to 03a73ca Compare January 22, 2024 14:34
Copy link

Integration tests failure for 77f46c29e794141c121e7182e371779adf167edb

Copy link

Integration tests failure for 03a73cae7126e8336e994c41eecdd17a2c4f00db

@sfc-gh-jcieslak sfc-gh-jcieslak force-pushed the refactor-snowflake-grant-privileges-to-role branch from 03a73ca to 970c40d Compare January 22, 2024 16:14
Copy link

Integration tests failure for 970c40d08fcfad6448e2f14980490e975bb26548

@sfc-gh-jcieslak sfc-gh-jcieslak force-pushed the refactor-snowflake-grant-privileges-to-role branch 2 times, most recently from 76f379f to 256efd1 Compare January 23, 2024 09:33
Copy link

Integration tests failure for 256efd1ca8b1a8348ef7286a6077be59f134afbc

Copy link

Integration tests failure for 76f379f6eb114c09b56f6fcf50a038790219591b

@sfc-gh-jcieslak sfc-gh-jcieslak force-pushed the refactor-snowflake-grant-privileges-to-role branch from d5f564f to a3ba5b4 Compare January 23, 2024 15:40
Copy link

Integration tests failure for a3ba5b4814afcdce65d71cbef7321bb133bec3a9

Copy link

Integration tests failure for 9780ec6d548959d31836ad57c1c612efb6749610

@sfc-gh-jcieslak sfc-gh-jcieslak force-pushed the refactor-snowflake-grant-privileges-to-role branch from 9780ec6 to 4c78e81 Compare January 25, 2024 11:42
@sfc-gh-jcieslak sfc-gh-jcieslak merged commit e3d086e into main Jan 25, 2024
5 of 7 checks passed
@sfc-gh-jcieslak sfc-gh-jcieslak deleted the refactor-snowflake-grant-privileges-to-role branch January 25, 2024 11:42
Copy link

Integration tests failure for 4c78e81edbbe8be8d2022b35085b96fa3abc8e5a

sfc-gh-jcieslak pushed a commit that referenced this pull request Feb 2, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.85.0](v0.84.1...v0.85.0)
(2024-02-01)


### 🎉 **What's new:**

* Add API integration to the SDK
([#2409](#2409))
([23acda5](23acda5))
* add application to sdk
([#2350](#2350))
([de97ad8](de97ad8))
* add external funcs to sdk
([#2440](#2440))
([c8cf09b](c8cf09b))
* Add grant privileges to share resource
([#2447](#2447))
([d8241a5](d8241a5))
* Add materialized view to the SDK
([#2403](#2403))
([a5ce699](a5ce699))
* Add notification integration to the SDK
([#2412](#2412))
([d84240c](d84240c))
* add sequences to sdk
([#2351](#2351))
([d2e5ffd](d2e5ffd))
* add snowflake grant privileges to account role
([#2365](#2365))
([e3d086e](e3d086e))
* add streamlits to sdk
([#2400](#2400))
([129d24c](129d24c))
* add-call-with to sdk
([#2337](#2337))
([ebcd1bc](ebcd1bc))
* stages migration follow-up
([#2372](#2372))
([3939dbe](3939dbe))
* Use API integration from SDK
([#2429](#2429))
([1ccc864](1ccc864))
* Use managed account from the SDK
([#2420](#2420))
([3aaa080](3aaa080))
* Use materialized views and views from SDK
([#2448](#2448))
([dc66d02](dc66d02))
* Use notification integration from sdk
([#2445](#2445))
([e8915cc](e8915cc))
* use roles from the SDK
([#2405](#2405))
([c645b4d](c645b4d))
* Use row access policy from SDK
([#2428](#2428))
([119af5e](119af5e))
* Use SDK in the storage integration
([#2380](#2380))
([ce0741c](ce0741c))
* use sequence from sdk and add ordering attr
([#2419](#2419))
([973b8f7](973b8f7)),
closes
[#2387](#2387)
* Use stage from sdk
([#2427](#2427))
([c17effd](c17effd))


### 🔧 **Misc**

* add missing deprecation message
([#2451](#2451))
([77de569](77de569))


### 🐛 **Bug fixes:**

* account role test
([#2422](#2422))
([c1b47d1](c1b47d1))
* Adjust tests after Snowflake behavior change
([#2404](#2404))
([8c03ffb](8c03ffb))
* app-pkg unset
([#2399](#2399))
([fedb1df](fedb1df))
* Fix some bugs
([#2421](#2421))
([dec7cd9](dec7cd9)),
closes
[#2358](#2358)
[#2369](#2369)
[#2329](#2329)
* snowflake_grant_privileges_to_role read
([#2424](#2424))
([5385cec](5385cec))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: snowflake-release-please[bot] <105954990+snowflake-release-please[bot]@users.noreply.github.com>
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

3 participants