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]: snowflake_grant_database_application_role #3134

Closed
1 task done
yuukiyamanaka opened this issue Oct 14, 2024 · 4 comments
Closed
1 task done

[Feature]: snowflake_grant_database_application_role #3134

yuukiyamanaka opened this issue Oct 14, 2024 · 4 comments
Assignees
Labels
feature-request Used to mark issues with provider's missing functionalities

Comments

@yuukiyamanaka
Copy link

yuukiyamanaka commented Oct 14, 2024

Use Cases or Problem Statement

When I want to setup account budget using the docs, I need to quary the below:

GRANT USAGE ON INTEGRATION budgets_notification_integration
  TO APPLICATION snowflake;

I cannnot the terraform resource for this.
According to this docs, Application role has already Generally Avaialble.

The latest version only support snowflake_grant_application_role.
Do you have roadmap for supporting snowflake_application_role and snowflake_grant_database_application_role resources?

Category

category:resource

Object type(s)

No response

Proposal

Implement

  • snowflake_application_role resouce for CREATE/ALTER/DROP APPLICATION ROLE
  • snowflake_grant_database_application_role resouce for GRANT xxx TO APPLICATION xxx

How much impact is this issue causing?

Low

Additional Information

No response

Would you like to implement a fix?

  • Yeah, I'll take it 😎
@yuukiyamanaka yuukiyamanaka added the feature-request Used to mark issues with provider's missing functionalities label Oct 14, 2024
@sfc-gh-jmichalak
Copy link
Collaborator

sfc-gh-jmichalak commented Oct 14, 2024

Hi @yuukiyamanaka 👋

  1. We have Application Roles on our roadmap - in the Remaining Objects list. We'll start working on this after we conclude the essential objects, but we don't have a release date yet. As a workaround, you can use the unsafe_execute resource.

  2. snowflake_grant_privileges_to_application_role will not be added to the provider (read more here). Instead, granting privileges to application roles should be done in application’s setup script.

@yuukiyamanaka
Copy link
Author

@sfc-gh-jmichalak

Thank you for your reply.
I have two questions.

  1. If I were to implement a snowflake_application_role and submit a PR, would it be possible to have it merged?
  2. I understand that setup scripts should be used for application roles. On the other hand, if we want to grant permissions to a "Snowflake" Application, as in the Budget example above, is it possible to make changes to the setup script?

@sfc-gh-jcieslak
Copy link
Collaborator

sfc-gh-jcieslak commented Oct 15, 2024

Hey @yuukiyamanaka 👋
Both commands are not available to be run fully outside of the application context (setup script) that's why it doesn't make much sense to have it as a terraform resource (because you don't have many options on running those commands outside of the application context). For granting privileges to application roles you can read this. For granting application roles read this. The research on grants was done some time ago, but maybe when we come back to them in the future it will be possible to create such resources. Right now, we focus on other tasks to provide the V1 version of the provider.

@yuukiyamanaka
Copy link
Author

@sfc-gh-jcieslak
Thank you for your reply.
I fully understand. Thank you! 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Used to mark issues with provider's missing functionalities
Projects
None yet
Development

No branches or pull requests

3 participants