Skip to content

Commit

Permalink
fix: change default name context_template (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgniewek authored Nov 4, 2024
1 parent 1b770d6 commit a06402c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ List od code and variable (API) changes:
| <a name="input_granted_to_roles"></a> [granted\_to\_roles](#input\_granted\_to\_roles) | List of Snowflake Account Roles to grant this role to | `list(string)` | `[]` | no |
| <a name="input_granted_to_shares"></a> [granted\_to\_shares](#input\_granted\_to\_shares) | List of Snowflake Shares to grant this role to | `list(string)` | `[]` | no |
| <a name="input_name"></a> [name](#input\_name) | Name of the resource | `string` | n/a | yes |
| <a name="input_name_scheme"></a> [name\_scheme](#input\_name\_scheme) | Naming scheme configuration for the resource. This configuration is used to generate names using context provider:<br> - `properties` - list of properties to use when creating the name - is superseded by `var.context_templates`<br> - `delimiter` - delimited used to create the name from `properties` - is superseded by `var.context_templates`<br> - `context_template_name` - name of the context template used to create the name<br> - `replace_chars_regex` - regex to use for replacing characters in property-values created by the provider - any characters that match the regex will be removed from the name<br> - `extra_values` - map of extra label-value pairs, used to create a name | <pre>object({<br> properties = optional(list(string), ["environment", "name"])<br> delimiter = optional(string, "_")<br> context_template_name = optional(string, "snowflake-user")<br> replace_chars_regex = optional(string, "[^a-zA-Z0-9_]")<br> extra_values = optional(map(string))<br> })</pre> | `{}` | no |
| <a name="input_name_scheme"></a> [name\_scheme](#input\_name\_scheme) | Naming scheme configuration for the resource. This configuration is used to generate names using context provider:<br> - `properties` - list of properties to use when creating the name - is superseded by `var.context_templates`<br> - `delimiter` - delimited used to create the name from `properties` - is superseded by `var.context_templates`<br> - `context_template_name` - name of the context template used to create the name<br> - `replace_chars_regex` - regex to use for replacing characters in property-values created by the provider - any characters that match the regex will be removed from the name<br> - `extra_values` - map of extra label-value pairs, used to create a name | <pre>object({<br> properties = optional(list(string), ["environment", "name"])<br> delimiter = optional(string, "_")<br> context_template_name = optional(string, "snowflake-database-role")<br> replace_chars_regex = optional(string, "[^a-zA-Z0-9_]")<br> extra_values = optional(map(string))<br> })</pre> | `{}` | no |
| <a name="input_parent_database_role"></a> [parent\_database\_role](#input\_parent\_database\_role) | DEPRECATED variable - please use `granted_to_database_roles` instead | `string` | `null` | no |
| <a name="input_schema_grants"></a> [schema\_grants](#input\_schema\_grants) | Grants on a schema level | <pre>list(object({<br> all_privileges = optional(bool)<br> with_grant_option = optional(bool, false)<br> privileges = optional(list(string), null)<br> all_schemas_in_database = optional(bool, false)<br> future_schemas_in_database = optional(bool, false)<br> schema_name = optional(string, null)<br> }))</pre> | `[]` | no |
| <a name="input_schema_objects_grants"></a> [schema\_objects\_grants](#input\_schema\_objects\_grants) | Grants on a schema object level<br><br> Example usage:<br><br> schema\_objects\_grants = {<br> "TABLE" = [<br> {<br> privileges = ["SELECT"]<br> object\_name = snowflake\_table.table\_1.name<br> schema\_name = snowflake\_schema.this.name<br> },<br> {<br> all\_privileges = true<br> object\_name = snowflake\_table.table\_2.name<br> schema\_name = snowflake\_schema.this.name<br> }<br> ]<br> "ALERT" = [<br> {<br> all\_privileges = true<br> on\_future = true<br> on\_all = true<br> }<br> ]<br> }<br><br> Note: If you don't provide a schema\_name, the grants will be created for all objects of that type in the database.<br> You can find a list of all object types [here](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/resources/grant_privileges_to_database_role#object_type) | <pre>map(list(object({<br> all_privileges = optional(bool)<br> with_grant_option = optional(bool)<br> privileges = optional(list(string))<br> object_name = optional(string)<br> on_all = optional(bool, false)<br> schema_name = optional(string)<br> on_future = optional(bool, false)<br> })))</pre> | `{}` | no |
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ variable "name_scheme" {
type = object({
properties = optional(list(string), ["environment", "name"])
delimiter = optional(string, "_")
context_template_name = optional(string, "snowflake-user")
context_template_name = optional(string, "snowflake-database-role")
replace_chars_regex = optional(string, "[^a-zA-Z0-9_]")
extra_values = optional(map(string))
})
Expand Down

0 comments on commit a06402c

Please sign in to comment.