Skip to content

Commit

Permalink
chore: Add small adjustments (#2783)
Browse files Browse the repository at this point in the history
Done in the pr:
- Added CREATE NOTEBOOKS privilege (and other missing privileges) based
on
https://docs.snowflake.com/en/sql-reference/sql/grant-privilege#syntax
- Added references to the FAQ in issue templates
  • Loading branch information
sfc-gh-jcieslak authored May 8, 2024
1 parent cc0a6a7 commit e5b0b4b
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 26 deletions.
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/01-bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ labels: ["bug"]
body:
- type: markdown
attributes:
# TODO(SNOW-1003360): Link doc how to submit issues and FAQ
# - [Frequently Asked Questions](https://github.com/Snowflake-Labs/)
value: |
# Thank you for raising a bug report!
Expand All @@ -16,6 +14,7 @@ body:
If you would like to contribute to the project, please let us know and refer to the [contribution guide](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/CONTRIBUTING.md) for tips on getting started.
Here's a list of useful links that may help you with your issue:
- [Guide on creating issues + FAQ + Commonly Known Issues](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/CREATING_ISSUES.md) - If you would like to create a GitHub issue, please read our guide first. It contains useful links, FAQ, and commonly known issues with solutions that may already solve your case.
- [Migration Guide](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/MIGRATION_GUIDE.md) - when introducing breaking changes, we note them in the migration guide and describe how to upgrade to the next version. If you recently upgraded the provider version, please check if you applied all the needed changes.
- type: markdown
Expand Down
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/02-general-usage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ labels: ["general-usage"]
body:
- type: markdown
attributes:
# TODO(SNOW-1003360): Link doc how to submit issues and FAQ
# - [Frequently Asked Questions](https://github.com/Snowflake-Labs/)
value: |
# Thank you for raising an issue!
Expand All @@ -20,6 +18,7 @@ body:
This helps to keep all relevant information in one place, including any potential workarounds.
Here's a list of useful links that may help you with your issue:
- [Guide on creating issues + FAQ + Commonly Known Issues](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/CREATING_ISSUES.md) - If you would like to create a GitHub issue, please read our guide first. It contains useful links, FAQ, and commonly known issues with solutions that may already solve your case.
- [Migration Guide](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/MIGRATION_GUIDE.md) - when introducing breaking changes, we note them in the migration guide and describe how to upgrade to the next version. If you recently upgraded the provider version, please check if you applied all the needed changes.
- type: markdown
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/03-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ description: Issues or feature requests for the documentation.
title: "[Docs]: "
labels: ["docs"]
body:
# TODO(SNOW-1003360): Link doc how to submit issues and FAQ
- type: markdown
attributes:
value: |
# Thank you for raising a documentation issue!
This form is meant to alert the maintainers to an issue with any of documentation connected with the provider, especially in:
- [Guide on creating issues + FAQ + Commonly Known Issues](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/CREATING_ISSUES.md) - If you would like to create a GitHub issue, please read our guide first. It contains useful links, FAQ, and commonly known issues with solutions that may already solve your case.
- [Terraform Registry](https://registry.terraform.io/providers/hashicorp/snowflake/latest) (such as resource and data source documentation, guides and examples).
- [Project README](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/README.md).
- [Contribution Guide](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/CONTRIBUTING.md).
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/04-feature-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ description: Something is missing or could be improved.
title: "[Feature]: "
labels: ["feature-request"]
body:
# TODO(SNOW-1003360): Link doc how to submit issues and FAQ
- type: markdown
attributes:
value: |
Expand All @@ -17,6 +16,7 @@ body:
If you would like to contribute to the project, please let us know and refer to the [contribution guide](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/CONTRIBUTING.md) for tips on getting started.
Here's a list of useful links that may answer your question:
- [Guide on creating issues + FAQ + Commonly Known Issues](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/CREATING_ISSUES.md) - If you would like to create a GitHub issue, please read our guide first. It contains useful links, FAQ, and commonly known issues with solutions that may already solve your case.
- [Provider Roadmap](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/ROADMAP.md)
- id: use-case
Expand Down
11 changes: 7 additions & 4 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ contact_links:
url: https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/MIGRATION_GUIDE.md
about: Migration Guide that presents breaking changes between the versions with actions needed during upgrading.

# TODO(SNOW-1003360): Link FAQ
#- name: Frequently Asked Questions / Common issues with solutions
# url: https://github.com/Snowflake-Labs/terraform-provider-snowflake/
# about: A list of common provider question and issues with workarounds or solutions for them.
- name: Migrating from deprecated resources
url: https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/docs/technical-documentation/resource_migration.md
about: This guide may help you with migrating your deprecated resources to the newer counter-parts. It also presents different strategies on importing already existing Snowflake infrastructure into Terraform.

- name: Guide on creating issues + FAQ + Commonly Known Issues
url: https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/CREATING_ISSUES.md
about: If you would like to create a GitHub issue, please read our guide first. It contains useful links, FAQ, and commonly known issues with solutions that may already solve your case.
39 changes: 23 additions & 16 deletions pkg/sdk/privileges.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ const (
GlobalPrivilegeCreateUser GlobalPrivilege = "CREATE USER"
GlobalPrivilegeCreateWarehouse GlobalPrivilege = "CREATE WAREHOUSE"

GlobalPrivilegeAttachPolicy GlobalPrivilege = "ATTACH POLICY"
GlobalPrivilegeAudit GlobalPrivilege = "AUDIT"
GlobalPrivilegeBindServiceEndpoint GlobalPrivilege = "BIND SERVICE ENDPOINT"

GlobalPrivilegeApplyAggregationPolicy GlobalPrivilege = "APPLY AGGREGATION POLICY"
GlobalPrivilegeApplyAuthenticationPolicy GlobalPrivilege = "APPLY AUTHENTICATION POLICY"
GlobalPrivilegeApplyMaskingPolicy GlobalPrivilege = "APPLY MASKING POLICY"
Expand All @@ -27,18 +31,18 @@ const (
GlobalPrivilegeApplySessionPolicy GlobalPrivilege = "APPLY SESSION POLICY"
GlobalPrivilegeApplyTag GlobalPrivilege = "APPLY TAG"

GlobalPrivilegeAttachPolicy GlobalPrivilege = "ATTACH POLICY"
GlobalPrivilegeAudit GlobalPrivilege = "AUDIT"
GlobalPrivilegeBindServiceEndpoint GlobalPrivilege = "BIND SERVICE ENDPOINT"

GlobalPrivilegeExecuteAlert GlobalPrivilege = "EXECUTE ALERT"
GlobalPrivilegeExecuteTask GlobalPrivilege = "EXECUTE TASK"
GlobalPrivilegeExecuteAlert GlobalPrivilege = "EXECUTE ALERT"
GlobalPrivilegeExecuteDataMetricFunction GlobalPrivilege = "EXECUTE DATA METRIC FUNCTION"
GlobalPrivilegeExecuteTask GlobalPrivilege = "EXECUTE TASK"

GlobalPrivilegeImportShare GlobalPrivilege = "IMPORT SHARE"

GlobalPrivilegeManageGrants GlobalPrivilege = "MANAGE GRANTS"
GlobalPrivilegeManageListingAutoFulfillment GlobalPrivilege = "MANAGE LISTING AUTO FULFILLMENT"
GlobalPrivilegeManageWarehouses GlobalPrivilege = "MANAGE WAREHOUSES"
GlobalPrivilegeManageAccountSupportCases GlobalPrivilege = "MANAGE ACCOUNT SUPPORT CASES"
GlobalPrivilegeManageGrants GlobalPrivilege = "MANAGE GRANTS"
GlobalPrivilegeManageListingAutoFulfillment GlobalPrivilege = "MANAGE LISTING AUTO FULFILLMENT"
GlobalPrivilegeManageOrganizationSupportCases GlobalPrivilege = "MANAGE ORGANIZATION SUPPORT CASES"
GlobalPrivilegeManageUserSupportCases GlobalPrivilege = "MANAGE USER SUPPORT CASES"
GlobalPrivilegeManageWarehouses GlobalPrivilege = "MANAGE WAREHOUSES"

GlobalPrivilegeModifyLogLevel GlobalPrivilege = "MODIFY LOG LEVEL"
GlobalPrivilegeModifyTraceLevel GlobalPrivilege = "MODIFY TRACE LEVEL"
Expand Down Expand Up @@ -119,14 +123,10 @@ const (
SchemaPrivilegeAddSearchOptimization SchemaPrivilege = "ADD SEARCH OPTIMIZATION"
SchemaPrivilegeApplyBudget SchemaPrivilege = "APPLYBUDGET"
SchemaPrivilegeCreateAlert SchemaPrivilege = "CREATE ALERT"
SchemaPrivilegeCreateDynamicTable SchemaPrivilege = "CREATE DYNAMIC TABLE"
SchemaPrivilegeCreateExternalTable SchemaPrivilege = "CREATE EXTERNAL TABLE"
SchemaPrivilegeCreateFileFormat SchemaPrivilege = "CREATE FILE FORMAT"
SchemaPrivilegeCreateFunction SchemaPrivilege = "CREATE FUNCTION"
SchemaPrivilegeCreateHybridTable SchemaPrivilege = "CREATE HYBRID TABLE"
SchemaPrivilegeCreateGitRepository SchemaPrivilege = "CREATE GIT REPOSITORY"
SchemaPrivilegeCreateImageRepository SchemaPrivilege = "CREATE IMAGE REPOSITORY"
SchemaPrivilegeCreateIcebergTable SchemaPrivilege = "CREATE ICEBERG TABLE"
SchemaPrivilegeCreateMaterializedView SchemaPrivilege = "CREATE MATERIALIZED VIEW"
SchemaPrivilegeCreateModel SchemaPrivilege = "CREATE MODEL"
SchemaPrivilegeCreateNetworkRule SchemaPrivilege = "CREATE NETWORK RULE"
SchemaPrivilegeCreatePipe SchemaPrivilege = "CREATE PIPE"
Expand All @@ -139,22 +139,29 @@ const (
SchemaPrivilegeCreateProjectionPolicy SchemaPrivilege = "CREATE PROJECTION POLICY"
SchemaPrivilegeCreateRowAccessPolicy SchemaPrivilege = "CREATE ROW ACCESS POLICY"
SchemaPrivilegeCreateSessionPolicy SchemaPrivilege = "CREATE SESSION POLICY"
SchemaPrivilegeCreateService SchemaPrivilege = "CREATE SERVICE"
SchemaPrivilegeCreateSecret SchemaPrivilege = "CREATE SECRET"
SchemaPrivilegeCreateSequence SchemaPrivilege = "CREATE SEQUENCE"
SchemaPrivilegeCreateService SchemaPrivilege = "CREATE SERVICE"
SchemaPrivilegeCreateSnapshot SchemaPrivilege = "CREATE SNAPSHOT"
SchemaPrivilegeCreateStage SchemaPrivilege = "CREATE STAGE"
SchemaPrivilegeCreateStream SchemaPrivilege = "CREATE STREAM"
SchemaPrivilegeCreateStreamlit SchemaPrivilege = "CREATE STREAMLIT"
SchemaPrivilegeCreateSnowflakeCoreBudget SchemaPrivilege = "CREATE SNOWFLAKE.CORE.BUDGET"
SchemaPrivilegeCreateSnowflakeMlAnomalyDetection SchemaPrivilege = "CREATE SNOWFLAKE.ML.ANOMALY_DETECTION"
SchemaPrivilegeCreateSnowflakeMlForecast SchemaPrivilege = "CREATE SNOWFLAKE.ML.FORECAST"
SchemaPrivilegeCreateTag SchemaPrivilege = "CREATE TAG"
SchemaPrivilegeCreateDynamicTable SchemaPrivilege = "CREATE DYNAMIC TABLE"
SchemaPrivilegeCreateExternalTable SchemaPrivilege = "CREATE EXTERNAL TABLE"
SchemaPrivilegeCreateHybridTable SchemaPrivilege = "CREATE HYBRID TABLE"
SchemaPrivilegeCreateIcebergTable SchemaPrivilege = "CREATE ICEBERG TABLE"
SchemaPrivilegeCreateTable SchemaPrivilege = "CREATE TABLE"
SchemaPrivilegeCreateTag SchemaPrivilege = "CREATE TAG"
SchemaPrivilegeCreateTask SchemaPrivilege = "CREATE TASK"
SchemaPrivilegeCreateMaterializedView SchemaPrivilege = "CREATE MATERIALIZED VIEW"
SchemaPrivilegeCreateView SchemaPrivilege = "CREATE VIEW"
SchemaPrivilegeModify SchemaPrivilege = "MODIFY"
SchemaPrivilegeMonitor SchemaPrivilege = "MONITOR"
SchemaPrivilegeUsage SchemaPrivilege = "USAGE"
SchemaPrivilegeCreateNotebook SchemaPrivilege = "CREATE NOTEBOOK"
)

func (p SchemaPrivilege) String() string {
Expand Down

0 comments on commit e5b0b4b

Please sign in to comment.