Skip to content

Commit

Permalink
chore: Grant ownership common use cases (#3356)
Browse files Browse the repository at this point in the history
## Changes
- [x] write and test common grant ownership use cases
- [x] link examples from grant ownership doc and grant ownership
overview
  • Loading branch information
sfc-gh-jcieslak authored Feb 3, 2025
1 parent e5e98bd commit 97813b6
Show file tree
Hide file tree
Showing 6 changed files with 813 additions and 1 deletion.
16 changes: 16 additions & 0 deletions CREATING_ISSUES.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
* [Granting on Functions or Procedures](#granting-on-functions-or-procedures)
* [Infinite diffs, empty privileges, errors when revoking on grant resources](#infinite-diffs-empty-privileges-errors-when-revoking-on-grant-resources)
* [Granting PUBLIC role fails](#granting-public-role-fails)
* [Issues with grant_ownership resource](#issues-with-grant_ownership)
* [Using QUOTED_IDENTIFIERS_IGNORE_CASE with the provider](#using-quoted_identifiers_ignore_case-with-the-provider)

This guide was made to aid with creating the GitHub issues, so you can maximize your chances of getting help as quickly as possible.
To correctly report the issue, we suggest going through the following steps.
Expand Down Expand Up @@ -276,3 +278,17 @@ Terraform may fail with:
**Related issues:** [#3001](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3001), [#2848](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2848)

**Solution:** This happens, because the PUBLIC role is a "pseudo-role" (see [docs](https://docs.snowflake.com/en/user-guide/security-access-control-overview#system-defined-roles)) that is already assigned to every role and user, so there is no need to grant it through Terraform. If you have an issue with removing the resources please use `terraform state rm <id>` to remove the resource from the state (and you can safely remove the configuration).

### Issues with grant_ownership

Please read our [guide for grant_ownership](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/grant_ownership_common_use_cases) resource.
It contains common use cases and issues that you may encounter when dealing with ownership transfers.

### Using QUOTED_IDENTIFIERS_IGNORE_CASE with the provider

**Problem:** When `QUOTED_IDENTIFIERS_IGNORE_CASE` parameter is set to true, but resource identifier fields are filled with lowercase letters,
during `terrform apply` they may fail with the `Error: Provider produced inconsistent result after apply` error (removing themselves from the state in the meantime).

**Related issues:** [#2967](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2967)

**Solution:** Either turn off the parameter or adjust your configurations to use only upper-cased names for identifiers and import back the resources.
Loading

0 comments on commit 97813b6

Please sign in to comment.