You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Simple](examples/simple) - Basic usage of the module
45
45
-[Complete](examples/complete) - Advanced usage of the module
46
46
47
+
48
+
## Breaking changes in v2.x of the module
49
+
Due to breaking changes in Snowflake provider and additional code optimizations, **breaking changes** were introduced in `v2.0.0` version of this module.
50
+
51
+
List of code and variable (API) changes:
52
+
- Switched to `snowflake_grant_ownership` resource instead of provider-removed `snowflake_role_ownership_grant`
53
+
- Switched to `snowflake_database_role` module to leverage new `database_roles` mechanism
54
+
-`default_roles` and `custom_roles` are now combined and managed by single module
55
+
-`create_default_roles` variable was renamed to `create_default_database_roles`
56
+
-`roles` variable map received following additions:
57
+
-`all_privileges` - optional, bool
58
+
-`on_all` - optional, bool, defaults to false
59
+
-`on_future` - optional, bool, defaults to false
60
+
-`with_grant_option` - optional, bool
61
+
-`granted_to_database_roles` - optional, string
62
+
-`granted_database_roles` - optional, list of strings
63
+
64
+
- and got following items removed:
65
+
-`enabled`
66
+
-`comment`
67
+
-`role_ownership_grant`
68
+
-`granted_roles`
69
+
-`granted_to_users`
70
+
71
+
72
+
When upgrading from `v1.x`, expect most of the resources to be recreated - if recreation is impossible, then it is possible to import some existing resources.
73
+
74
+
For more information, refer to [variables.tf](variables.tf), list of inputs below and Snowflake provider documentation
75
+
47
76
<!-- BEGIN_TF_DOCS -->
48
77
49
78
@@ -59,7 +88,7 @@ module "snowflake_stage" {
59
88
| <aname="input_comment"></a> [comment](#input\_comment)| Specifies a comment for the stage |`string`|`null`| no |
60
89
| <aname="input_context"></a> [context](#input\_context)| Single object for setting entire context at once.<br>See description of individual variables for details.<br>Leave string and numeric variables as `null` to use default value.<br>Individual variable settings (non-null) override settings in context object,<br>except for attributes, tags, and additional\_tag\_map, which are merged. |`any`| <pre>{<br> "additional_tag_map": {},<br> "attributes": [],<br> "delimiter": null,<br> "descriptor_formats": {},<br> "enabled": true,<br> "environment": null,<br> "id_length_limit": null,<br> "label_key_case": null,<br> "label_order": [],<br> "label_value_case": null,<br> "labels_as_tags": [<br> "unset"<br> ],<br> "name": null,<br> "namespace": null,<br> "regex_replace_chars": null,<br> "stage": null,<br> "tags": {},<br> "tenant": null<br>}</pre> | no |
61
90
| <aname="input_copy_options"></a> [copy\_options](#input\_copy\_options)| Specifies the copy options for the stage |`string`|`null`| no |
62
-
| <aname="input_create_default_roles"></a> [create\_default\_roles](#input\_create\_default\_roles)| Whether the default roles should be created |`bool`|`false`| no |
91
+
| <aname="input_create_default_database_roles"></a> [create\_default\_database\_roles](#input\_create\_default\_database\_roles)| Whether the default database roles should be created |`bool`|`false`| no |
63
92
| <aname="input_credentials"></a> [credentials](#input\_credentials)| Specifies the credentials for the stage |`string`|`null`| no |
64
93
| <aname="input_database"></a> [database](#input\_database)| The database in which to create the stage |`string`| n/a | yes |
65
94
| <aname="input_delimiter"></a> [delimiter](#input\_delimiter)| Delimiter to be used between ID elements.<br>Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. |`string`|`null`| no |
@@ -78,10 +107,11 @@ module "snowflake_stage" {
78
107
| <aname="input_name"></a> [name](#input\_name)| ID element. Usually the component or solution name, e.g. 'app' or 'jenkins'.<br>This is the only ID element not also included as a `tag`.<br>The "name" tag is set to the full `id` string. There is no tag with the value of the `name` input. |`string`|`null`| no |
79
108
| <aname="input_namespace"></a> [namespace](#input\_namespace)| ID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp', to help ensure generated IDs are globally unique |`string`|`null`| no |
80
109
| <aname="input_regex_replace_chars"></a> [regex\_replace\_chars](#input\_regex\_replace\_chars)| Terraform regular expression (regex) string.<br>Characters matching the regex will be removed from the ID elements.<br>If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. |`string`|`null`| no |
81
-
| <aname="input_roles"></a> [roles](#input\_roles)|Roles created in the database scope | <pre>map(object({<br> enabled = optional(bool, true)<br> comment = optional(string)<br> role_ownership_grant = optional(string)<br> granted_roles= optional(list(string))<br> granted_to_roles = optional(list(string))<br> granted_to_users = optional(list(string))<br> stage_grants = optional(list(string))<br> }))</pre> |`{}`| no |
| <aname="input_schema"></a> [schema](#input\_schema)| The schema in which to create the stage |`string`| n/a | yes |
83
112
| <aname="input_snowflake_iam_user"></a> [snowflake\_iam\_user](#input\_snowflake\_iam\_user)| Specifies the Snowflake IAM user |`string`|`null`| no |
84
113
| <aname="input_stage"></a> [stage](#input\_stage)| ID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'build', 'test', 'deploy', 'release' |`string`|`null`| no |
114
+
| <aname="input_stage_ownership_grant"></a> [stage\_ownership\_grant](#input\_stage\_ownership\_grant)| To which role the stage ownership should be granted |`string`|`null`| no |
85
115
| <aname="input_storage_integration"></a> [storage\_integration](#input\_storage\_integration)| Specifies the name of the storage integration used to delegate authentication responsibility for external cloud storage to a Snowflake identity and access management (IAM) entity |`string`|`null`| no |
86
116
| <aname="input_tags"></a> [tags](#input\_tags)| Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`).<br>Neither the tag keys nor the tag values will be modified by this module. |`map(string)`|`{}`| no |
87
117
| <aname="input_tenant"></a> [tenant](#input\_tenant)| ID element \_(Rarely used, not included by default)\_. A customer identifier, indicating who this instance of a resource is for |`string`|`null`| no |
0 commit comments