Skip to content

Commit

Permalink
fix: change the function_grant documentation example privilege to usa…
Browse files Browse the repository at this point in the history
…ge (#901)
  • Loading branch information
jrobison-sb committed Mar 15, 2022
1 parent 7229387 commit 70d9550
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/resources/function_grant.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ resource snowflake_function_grant grant {
]
return_type = "string"
privilege = "select"
privilege = "USAGE"
roles = [
"role1",
"role2",
Expand Down Expand Up @@ -60,7 +60,7 @@ resource snowflake_function_grant grant {
- **function_name** (String) The name of the function on which to grant privileges immediately (only valid if on_future is false).
- **id** (String) The ID of this resource.
- **on_future** (Boolean) When this is set to true and a schema_name is provided, apply this grant on all future functions in the given schema. When this is true and no schema_name is provided apply this grant on all future functions in the given database. The function_name, arguments, return_type, and shares fields must be unset in order to use on_future.
- **privilege** (String) The privilege to grant on the current or future function.
- **privilege** (String) The privilege to grant on the current or future function. Must be one of `USAGE` or `OWNERSHIP`.
- **return_type** (String) The return type of the function (must be present if function_name is present)
- **roles** (Set of String) Grants privilege to these roles.
- **shares** (Set of String) Grants privilege to these shares (only valid if on_future is false).
Expand Down
2 changes: 1 addition & 1 deletion examples/resources/snowflake_function_grant/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ resource snowflake_function_grant grant {
]
return_type = "string"

privilege = "select"
privilege = "USAGE"
roles = [
"role1",
"role2",
Expand Down
2 changes: 1 addition & 1 deletion pkg/resources/function_grant.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ var functionGrantSchema = map[string]*schema.Schema{
"privilege": {
Type: schema.TypeString,
Optional: true,
Description: "The privilege to grant on the current or future function.",
Description: "The privilege to grant on the current or future function. Must be one of `USAGE` or `OWNERSHIP`.",
Default: "USAGE",
ValidateFunc: validation.ValidatePrivilege(validFunctionPrivileges.ToList(), true),
ForceNew: true,
Expand Down

0 comments on commit 70d9550

Please sign in to comment.