pulumi-snowflake 0.50.2a1709892015__py3-none-any.whl → 1.2.0a1736835738__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pulumi-snowflake might be problematic. Click here for more details.

Files changed (182) hide show
  1. pulumi_snowflake/__init__.py +224 -172
  2. pulumi_snowflake/_inputs.py +52854 -1662
  3. pulumi_snowflake/_utilities.py +41 -5
  4. pulumi_snowflake/account.py +188 -214
  5. pulumi_snowflake/account_authentication_policy_attachment.py +149 -0
  6. pulumi_snowflake/account_parameter.py +21 -44
  7. pulumi_snowflake/account_password_policy_attachment.py +7 -28
  8. pulumi_snowflake/account_role.py +250 -0
  9. pulumi_snowflake/alert.py +38 -43
  10. pulumi_snowflake/api_authentication_integration_with_authorization_code_grant.py +704 -0
  11. pulumi_snowflake/api_authentication_integration_with_client_credentials.py +657 -0
  12. pulumi_snowflake/api_authentication_integration_with_jwt_bearer.py +692 -0
  13. pulumi_snowflake/api_integration.py +35 -50
  14. pulumi_snowflake/authentication_policy.py +622 -0
  15. pulumi_snowflake/config/__init__.pyi +76 -99
  16. pulumi_snowflake/config/outputs.py +5 -0
  17. pulumi_snowflake/config/vars.py +93 -124
  18. pulumi_snowflake/cortex_search_service.py +596 -0
  19. pulumi_snowflake/database.py +819 -209
  20. pulumi_snowflake/database_role.py +81 -40
  21. pulumi_snowflake/dynamic_table.py +44 -47
  22. pulumi_snowflake/email_notification_integration.py +35 -26
  23. pulumi_snowflake/{unsafe_execute.py → execute.py} +36 -139
  24. pulumi_snowflake/external_function.py +54 -71
  25. pulumi_snowflake/external_oauth_integration.py +593 -538
  26. pulumi_snowflake/external_table.py +67 -86
  27. pulumi_snowflake/external_volume.py +382 -0
  28. pulumi_snowflake/failover_group.py +59 -96
  29. pulumi_snowflake/file_format.py +33 -24
  30. pulumi_snowflake/function_java.py +1211 -0
  31. pulumi_snowflake/function_javascript.py +882 -0
  32. pulumi_snowflake/function_python.py +1212 -0
  33. pulumi_snowflake/function_scala.py +1212 -0
  34. pulumi_snowflake/function_sql.py +835 -0
  35. pulumi_snowflake/get_account_roles.py +129 -0
  36. pulumi_snowflake/get_accounts.py +53 -22
  37. pulumi_snowflake/get_alerts.py +22 -5
  38. pulumi_snowflake/get_connections.py +109 -0
  39. pulumi_snowflake/get_cortex_search_services.py +216 -0
  40. pulumi_snowflake/get_current_account.py +24 -9
  41. pulumi_snowflake/get_current_role.py +14 -7
  42. pulumi_snowflake/get_database.py +25 -5
  43. pulumi_snowflake/get_database_role.py +162 -0
  44. pulumi_snowflake/get_database_roles.py +79 -43
  45. pulumi_snowflake/get_databases.py +91 -69
  46. pulumi_snowflake/get_dynamic_tables.py +36 -19
  47. pulumi_snowflake/get_external_functions.py +28 -5
  48. pulumi_snowflake/get_external_tables.py +28 -5
  49. pulumi_snowflake/get_failover_groups.py +18 -7
  50. pulumi_snowflake/get_file_formats.py +28 -5
  51. pulumi_snowflake/get_functions.py +28 -5
  52. pulumi_snowflake/get_grants.py +207 -80
  53. pulumi_snowflake/get_masking_policies.py +91 -47
  54. pulumi_snowflake/get_materialized_views.py +28 -5
  55. pulumi_snowflake/get_network_policies.py +129 -0
  56. pulumi_snowflake/get_parameters.py +38 -11
  57. pulumi_snowflake/get_pipes.py +28 -5
  58. pulumi_snowflake/get_procedures.py +28 -5
  59. pulumi_snowflake/get_resource_monitors.py +37 -20
  60. pulumi_snowflake/get_row_access_policies.py +91 -47
  61. pulumi_snowflake/get_schemas.py +145 -37
  62. pulumi_snowflake/get_secrets.py +200 -0
  63. pulumi_snowflake/get_security_integrations.py +129 -0
  64. pulumi_snowflake/get_sequences.py +28 -5
  65. pulumi_snowflake/get_shares.py +18 -5
  66. pulumi_snowflake/get_stages.py +28 -5
  67. pulumi_snowflake/get_storage_integrations.py +16 -5
  68. pulumi_snowflake/get_streamlits.py +170 -0
  69. pulumi_snowflake/get_streams.py +114 -50
  70. pulumi_snowflake/get_system_generate_scim_access_token.py +18 -5
  71. pulumi_snowflake/get_system_get_aws_sns_iam_policy.py +32 -7
  72. pulumi_snowflake/get_system_get_private_link_config.py +121 -6
  73. pulumi_snowflake/get_system_get_snowflake_platform_info.py +15 -7
  74. pulumi_snowflake/get_tables.py +28 -5
  75. pulumi_snowflake/get_tags.py +130 -0
  76. pulumi_snowflake/get_tasks.py +134 -50
  77. pulumi_snowflake/get_users.py +116 -40
  78. pulumi_snowflake/get_views.py +114 -50
  79. pulumi_snowflake/get_warehouses.py +79 -22
  80. pulumi_snowflake/grant_account_role.py +28 -61
  81. pulumi_snowflake/grant_application_role.py +257 -0
  82. pulumi_snowflake/grant_database_role.py +35 -108
  83. pulumi_snowflake/grant_ownership.py +382 -0
  84. pulumi_snowflake/grant_privileges_to_account_role.py +42 -78
  85. pulumi_snowflake/grant_privileges_to_database_role.py +37 -223
  86. pulumi_snowflake/grant_privileges_to_share.py +96 -44
  87. pulumi_snowflake/legacy_service_user.py +3670 -0
  88. pulumi_snowflake/managed_account.py +42 -9
  89. pulumi_snowflake/masking_policy.py +213 -306
  90. pulumi_snowflake/materialized_view.py +62 -67
  91. pulumi_snowflake/network_policy.py +217 -57
  92. pulumi_snowflake/network_policy_attachment.py +7 -32
  93. pulumi_snowflake/network_rule.py +473 -0
  94. pulumi_snowflake/notification_integration.py +51 -82
  95. pulumi_snowflake/oauth_integration_for_custom_clients.py +906 -0
  96. pulumi_snowflake/{oauth_integration.py → oauth_integration_for_partner_applications.py} +191 -188
  97. pulumi_snowflake/object_parameter.py +12 -99
  98. pulumi_snowflake/outputs.py +49200 -2928
  99. pulumi_snowflake/password_policy.py +41 -28
  100. pulumi_snowflake/pipe.py +33 -0
  101. pulumi_snowflake/primary_connection.py +330 -0
  102. pulumi_snowflake/procedure_java.py +1273 -0
  103. pulumi_snowflake/procedure_javascript.py +895 -0
  104. pulumi_snowflake/procedure_python.py +1226 -0
  105. pulumi_snowflake/procedure_scala.py +1273 -0
  106. pulumi_snowflake/procedure_sql.py +895 -0
  107. pulumi_snowflake/provider.py +378 -613
  108. pulumi_snowflake/pulumi-plugin.json +2 -1
  109. pulumi_snowflake/resource_monitor.py +118 -323
  110. pulumi_snowflake/row_access_policy.py +200 -145
  111. pulumi_snowflake/{saml_integration.py → saml2_integration.py} +356 -295
  112. pulumi_snowflake/schema.py +949 -174
  113. pulumi_snowflake/scim_integration.py +286 -105
  114. pulumi_snowflake/secondary_connection.py +339 -0
  115. pulumi_snowflake/secondary_database.py +1080 -0
  116. pulumi_snowflake/secret_with_authorization_code_grant.py +548 -0
  117. pulumi_snowflake/secret_with_basic_authentication.py +500 -0
  118. pulumi_snowflake/secret_with_client_credentials.py +511 -0
  119. pulumi_snowflake/secret_with_generic_string.py +452 -0
  120. pulumi_snowflake/sequence.py +9 -30
  121. pulumi_snowflake/service_user.py +3585 -0
  122. pulumi_snowflake/share.py +35 -26
  123. pulumi_snowflake/shared_database.py +939 -0
  124. pulumi_snowflake/stage.py +95 -80
  125. pulumi_snowflake/storage_integration.py +48 -2
  126. pulumi_snowflake/stream_on_directory_table.py +517 -0
  127. pulumi_snowflake/stream_on_external_table.py +632 -0
  128. pulumi_snowflake/stream_on_table.py +666 -0
  129. pulumi_snowflake/stream_on_view.py +666 -0
  130. pulumi_snowflake/streamlit.py +671 -0
  131. pulumi_snowflake/table.py +86 -93
  132. pulumi_snowflake/table_column_masking_policy_application.py +7 -14
  133. pulumi_snowflake/table_constraint.py +29 -168
  134. pulumi_snowflake/tag.py +142 -70
  135. pulumi_snowflake/tag_association.py +40 -211
  136. pulumi_snowflake/task.py +3048 -414
  137. pulumi_snowflake/user.py +3351 -380
  138. pulumi_snowflake/user_authentication_policy_attachment.py +197 -0
  139. pulumi_snowflake/user_password_policy_attachment.py +7 -6
  140. pulumi_snowflake/user_public_keys.py +5 -0
  141. pulumi_snowflake/view.py +466 -211
  142. pulumi_snowflake/warehouse.py +184 -164
  143. {pulumi_snowflake-0.50.2a1709892015.dist-info → pulumi_snowflake-1.2.0a1736835738.dist-info}/METADATA +7 -6
  144. pulumi_snowflake-1.2.0a1736835738.dist-info/RECORD +148 -0
  145. {pulumi_snowflake-0.50.2a1709892015.dist-info → pulumi_snowflake-1.2.0a1736835738.dist-info}/WHEEL +1 -1
  146. pulumi_snowflake/account_grant.py +0 -339
  147. pulumi_snowflake/database_grant.py +0 -491
  148. pulumi_snowflake/external_table_grant.py +0 -686
  149. pulumi_snowflake/failover_group_grant.py +0 -388
  150. pulumi_snowflake/file_format_grant.py +0 -631
  151. pulumi_snowflake/function.py +0 -868
  152. pulumi_snowflake/function_grant.py +0 -741
  153. pulumi_snowflake/get_role.py +0 -117
  154. pulumi_snowflake/get_roles.py +0 -116
  155. pulumi_snowflake/grant_privileges_to_role.py +0 -667
  156. pulumi_snowflake/integration_grant.py +0 -436
  157. pulumi_snowflake/masking_policy_grant.py +0 -538
  158. pulumi_snowflake/materialized_view_grant.py +0 -685
  159. pulumi_snowflake/pipe_grant.py +0 -583
  160. pulumi_snowflake/procedure.py +0 -883
  161. pulumi_snowflake/procedure_grant.py +0 -741
  162. pulumi_snowflake/resource_monitor_grant.py +0 -383
  163. pulumi_snowflake/role.py +0 -269
  164. pulumi_snowflake/role_grants.py +0 -348
  165. pulumi_snowflake/role_ownership_grant.py +0 -334
  166. pulumi_snowflake/row_access_policy_grant.py +0 -536
  167. pulumi_snowflake/schema_grant.py +0 -643
  168. pulumi_snowflake/sequence_grant.py +0 -631
  169. pulumi_snowflake/session_parameter.py +0 -328
  170. pulumi_snowflake/stage_grant.py +0 -631
  171. pulumi_snowflake/stream.py +0 -610
  172. pulumi_snowflake/stream_grant.py +0 -631
  173. pulumi_snowflake/table_grant.py +0 -673
  174. pulumi_snowflake/tag_grant.py +0 -528
  175. pulumi_snowflake/tag_masking_policy_association.py +0 -210
  176. pulumi_snowflake/task_grant.py +0 -631
  177. pulumi_snowflake/user_grant.py +0 -390
  178. pulumi_snowflake/user_ownership_grant.py +0 -286
  179. pulumi_snowflake/view_grant.py +0 -701
  180. pulumi_snowflake/warehouse_grant.py +0 -436
  181. pulumi_snowflake-0.50.2a1709892015.dist-info/RECORD +0 -136
  182. {pulumi_snowflake-0.50.2a1709892015.dist-info → pulumi_snowflake-1.2.0a1736835738.dist-info}/top_level.txt +0 -0
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from . import _utilities
11
16
  from . import outputs
12
17
  from ._inputs import *
@@ -27,15 +32,10 @@ class GrantPrivilegesToDatabaseRoleArgs:
27
32
  with_grant_option: Optional[pulumi.Input[bool]] = None):
28
33
  """
29
34
  The set of arguments for constructing a GrantPrivilegesToDatabaseRole resource.
30
- :param pulumi.Input[str] database_role_name: The fully qualified name of the database role to which privileges will be granted.
35
+ :param pulumi.Input[str] database_role_name: The fully qualified name of the database role to which privileges will be granted. For more information about this resource, see docs.
31
36
  :param pulumi.Input[bool] all_privileges: Grant all privileges on the database role.
32
- :param pulumi.Input[bool] always_apply: If true, the resource will always produce a “plan” and on “apply” it will re-grant defined privileges. It is
33
- supposed to be used only in “grant privileges on all X’s in database / schema Y” or “grant all privileges to
34
- X” scenarios to make sure that every new object in a given database / schema is granted by the account role and every
35
- new privilege is granted to the database role. Important note: this flag is not compliant with the Terraform assumptions
36
- of the config being eventually convergent (producing an empty plan).
37
37
  :param pulumi.Input[str] always_apply_trigger: This is a helper field and should not be set. Its main purpose is to help to achieve the functionality described by the always_apply field.
38
- :param pulumi.Input[str] on_database: The fully qualified name of the database on which privileges will be granted.
38
+ :param pulumi.Input[str] on_database: The fully qualified name of the database on which privileges will be granted. For more information about this resource, see docs.
39
39
  :param pulumi.Input['GrantPrivilegesToDatabaseRoleOnSchemaArgs'] on_schema: Specifies the schema on which privileges will be granted.
40
40
  :param pulumi.Input['GrantPrivilegesToDatabaseRoleOnSchemaObjectArgs'] on_schema_object: Specifies the schema object on which privileges will be granted.
41
41
  :param pulumi.Input[Sequence[pulumi.Input[str]]] privileges: The privileges to grant on the database role.
@@ -63,7 +63,7 @@ class GrantPrivilegesToDatabaseRoleArgs:
63
63
  @pulumi.getter(name="databaseRoleName")
64
64
  def database_role_name(self) -> pulumi.Input[str]:
65
65
  """
66
- The fully qualified name of the database role to which privileges will be granted.
66
+ The fully qualified name of the database role to which privileges will be granted. For more information about this resource, see docs.
67
67
  """
68
68
  return pulumi.get(self, "database_role_name")
69
69
 
@@ -86,13 +86,6 @@ class GrantPrivilegesToDatabaseRoleArgs:
86
86
  @property
87
87
  @pulumi.getter(name="alwaysApply")
88
88
  def always_apply(self) -> Optional[pulumi.Input[bool]]:
89
- """
90
- If true, the resource will always produce a “plan” and on “apply” it will re-grant defined privileges. It is
91
- supposed to be used only in “grant privileges on all X’s in database / schema Y” or “grant all privileges to
92
- X” scenarios to make sure that every new object in a given database / schema is granted by the account role and every
93
- new privilege is granted to the database role. Important note: this flag is not compliant with the Terraform assumptions
94
- of the config being eventually convergent (producing an empty plan).
95
- """
96
89
  return pulumi.get(self, "always_apply")
97
90
 
98
91
  @always_apply.setter
@@ -115,7 +108,7 @@ class GrantPrivilegesToDatabaseRoleArgs:
115
108
  @pulumi.getter(name="onDatabase")
116
109
  def on_database(self) -> Optional[pulumi.Input[str]]:
117
110
  """
118
- The fully qualified name of the database on which privileges will be granted.
111
+ The fully qualified name of the database on which privileges will be granted. For more information about this resource, see docs.
119
112
  """
120
113
  return pulumi.get(self, "on_database")
121
114
 
@@ -187,14 +180,9 @@ class _GrantPrivilegesToDatabaseRoleState:
187
180
  """
188
181
  Input properties used for looking up and filtering GrantPrivilegesToDatabaseRole resources.
189
182
  :param pulumi.Input[bool] all_privileges: Grant all privileges on the database role.
190
- :param pulumi.Input[bool] always_apply: If true, the resource will always produce a “plan” and on “apply” it will re-grant defined privileges. It is
191
- supposed to be used only in “grant privileges on all X’s in database / schema Y” or “grant all privileges to
192
- X” scenarios to make sure that every new object in a given database / schema is granted by the account role and every
193
- new privilege is granted to the database role. Important note: this flag is not compliant with the Terraform assumptions
194
- of the config being eventually convergent (producing an empty plan).
195
183
  :param pulumi.Input[str] always_apply_trigger: This is a helper field and should not be set. Its main purpose is to help to achieve the functionality described by the always_apply field.
196
- :param pulumi.Input[str] database_role_name: The fully qualified name of the database role to which privileges will be granted.
197
- :param pulumi.Input[str] on_database: The fully qualified name of the database on which privileges will be granted.
184
+ :param pulumi.Input[str] database_role_name: The fully qualified name of the database role to which privileges will be granted. For more information about this resource, see docs.
185
+ :param pulumi.Input[str] on_database: The fully qualified name of the database on which privileges will be granted. For more information about this resource, see docs.
198
186
  :param pulumi.Input['GrantPrivilegesToDatabaseRoleOnSchemaArgs'] on_schema: Specifies the schema on which privileges will be granted.
199
187
  :param pulumi.Input['GrantPrivilegesToDatabaseRoleOnSchemaObjectArgs'] on_schema_object: Specifies the schema object on which privileges will be granted.
200
188
  :param pulumi.Input[Sequence[pulumi.Input[str]]] privileges: The privileges to grant on the database role.
@@ -234,13 +222,6 @@ class _GrantPrivilegesToDatabaseRoleState:
234
222
  @property
235
223
  @pulumi.getter(name="alwaysApply")
236
224
  def always_apply(self) -> Optional[pulumi.Input[bool]]:
237
- """
238
- If true, the resource will always produce a “plan” and on “apply” it will re-grant defined privileges. It is
239
- supposed to be used only in “grant privileges on all X’s in database / schema Y” or “grant all privileges to
240
- X” scenarios to make sure that every new object in a given database / schema is granted by the account role and every
241
- new privilege is granted to the database role. Important note: this flag is not compliant with the Terraform assumptions
242
- of the config being eventually convergent (producing an empty plan).
243
- """
244
225
  return pulumi.get(self, "always_apply")
245
226
 
246
227
  @always_apply.setter
@@ -263,7 +244,7 @@ class _GrantPrivilegesToDatabaseRoleState:
263
244
  @pulumi.getter(name="databaseRoleName")
264
245
  def database_role_name(self) -> Optional[pulumi.Input[str]]:
265
246
  """
266
- The fully qualified name of the database role to which privileges will be granted.
247
+ The fully qualified name of the database role to which privileges will be granted. For more information about this resource, see docs.
267
248
  """
268
249
  return pulumi.get(self, "database_role_name")
269
250
 
@@ -275,7 +256,7 @@ class _GrantPrivilegesToDatabaseRoleState:
275
256
  @pulumi.getter(name="onDatabase")
276
257
  def on_database(self) -> Optional[pulumi.Input[str]]:
277
258
  """
278
- The fully qualified name of the database on which privileges will be granted.
259
+ The fully qualified name of the database on which privileges will be granted. For more information about this resource, see docs.
279
260
  """
280
261
  return pulumi.get(self, "on_database")
281
262
 
@@ -342,87 +323,12 @@ class GrantPrivilegesToDatabaseRole(pulumi.CustomResource):
342
323
  always_apply_trigger: Optional[pulumi.Input[str]] = None,
343
324
  database_role_name: Optional[pulumi.Input[str]] = None,
344
325
  on_database: Optional[pulumi.Input[str]] = None,
345
- on_schema: Optional[pulumi.Input[pulumi.InputType['GrantPrivilegesToDatabaseRoleOnSchemaArgs']]] = None,
346
- on_schema_object: Optional[pulumi.Input[pulumi.InputType['GrantPrivilegesToDatabaseRoleOnSchemaObjectArgs']]] = None,
326
+ on_schema: Optional[pulumi.Input[Union['GrantPrivilegesToDatabaseRoleOnSchemaArgs', 'GrantPrivilegesToDatabaseRoleOnSchemaArgsDict']]] = None,
327
+ on_schema_object: Optional[pulumi.Input[Union['GrantPrivilegesToDatabaseRoleOnSchemaObjectArgs', 'GrantPrivilegesToDatabaseRoleOnSchemaObjectArgsDict']]] = None,
347
328
  privileges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
348
329
  with_grant_option: Optional[pulumi.Input[bool]] = None,
349
330
  __props__=None):
350
331
  """
351
- > **Note** This is a preview resource. It's ready for general use. In case of any errors, please file an issue in our GitHub repository.
352
-
353
- !> **Warning** Be careful when using `always_apply` field. It will always produce a plan (even when no changes were made) and can be harmful in some setups. For more details why we decided to introduce it to go our document explaining those design decisions (coming soon).
354
-
355
- ## Example Usage
356
- ### on database privileges
357
- ##################################
358
-
359
- # list of privileges
360
- resource "snowflake_grant_privileges_to_database_role" "example" {
361
- privileges = ["CREATE", "MONITOR"]
362
- database_role_name = "\\"${snowflake_database_role.db_role.database}\\".\\"${snowflake_database_role.db_role.name}\\""
363
- on_database = snowflake_database_role.db_role.database
364
- }
365
-
366
- # all privileges + grant option
367
- resource "snowflake_grant_privileges_to_database_role" "example" {
368
- database_role_name = "\\"${snowflake_database_role.db_role.database}\\".\\"${snowflake_database_role.db_role.name}\\""
369
- on_database = snowflake_database_role.db_role.database
370
- all_privileges = true
371
- with_grant_option = true
372
- }
373
-
374
- # all privileges + grant option + always apply
375
- resource "snowflake_grant_privileges_to_database_role" "example" {
376
- database_role_name = "\\"${snowflake_database_role.db_role.database}\\".\\"${snowflake_database_role.db_role.name}\\""
377
- on_database = snowflake_database_role.db_role.database
378
- always_apply = true
379
- all_privileges = true
380
- with_grant_option = true
381
- }
382
-
383
- ##################################
384
- ### schema privileges
385
- ##################################
386
-
387
- # list of privileges
388
- resource "snowflake_grant_privileges_to_database_role" "example" {
389
- privileges = ["MODIFY", "CREATE TABLE"]
390
- database_role_name = "\\"${snowflake_database_role.db_role.database}\\".\\"${snowflake_database_role.db_role.name}\\""
391
- on_schema {
392
- schema_name = "\\"${snowflake_database_role.db_role.database}\\".\\"my_schema\\"" # note this is a fully qualified name!
393
- }
394
- }
395
-
396
- # all privileges + grant option
397
- resource "snowflake_grant_privileges_to_database_role" "example" {
398
- database_role_name = "\\"${snowflake_database_role.db_role.database}\\".\\"${snowflake_database_role.db_role.name}\\""
399
- on_schema {
400
- schema_name = "\\"${snowflake_database_role.db_role.database}\\".\\"my_schema\\"" # note this is a fully qualified name!
401
- }
402
- all_privileges = true
403
- with_grant_option = true
404
- }
405
-
406
- # all schemas in database
407
- resource "snowflake_grant_privileges_to_database_role" "example" {
408
- privileges = ["MODIFY", "CREATE TABLE"]
409
- database_role_name = "\\"${snowflake_database_role.db_role.database}\\".\\"${snowflake_database_role.db_role.name}\\""
410
- on_schema {
411
- all_schemas_in_database = snowflake_database_role.db_role.database
412
- }
413
- }
414
-
415
- # future schemas in database
416
- resource "snowflake_grant_privileges_to_database_role" "example" {
417
- privileges = ["MODIFY", "CREATE TABLE"]
418
- database_role_name = "\\"${snowflake_database_role.db_role.database}\\".\\"${snowflake_database_role.db_role.name}\\""
419
- on_schema {
420
- future_schemas_in_database = snowflake_database_role.db_role.database
421
- }
422
- }
423
-
424
- ##################################
425
-
426
332
  ## Import
427
333
 
428
334
  ### Import examples
@@ -430,40 +336,35 @@ class GrantPrivilegesToDatabaseRole(pulumi.CustomResource):
430
336
  #### Grant all privileges OnDatabase
431
337
 
432
338
  ```sh
433
- $ pulumi import snowflake:index/grantPrivilegesToDatabaseRole:GrantPrivilegesToDatabaseRole \\"test_db_role\\"|false|false|ALL|OnDatabase|\\"test_db\\""`
339
+ $ pulumi import snowflake:index/grantPrivilegesToDatabaseRole:GrantPrivilegesToDatabaseRole example '"test_db"."test_db_role"|false|false|ALL|OnDatabase|"test_db"'`
434
340
  ```
435
341
 
436
342
  #### Grant list of privileges OnAllSchemasInDatabase
437
343
 
438
344
  ```sh
439
- $ pulumi import snowflake:index/grantPrivilegesToDatabaseRole:GrantPrivilegesToDatabaseRole \\"test_db_role\\"|false|false|CREATE TAG,CREATE TABLE|OnSchema|OnAllSchemasInDatabase|\\"test_db\\""`
345
+ $ pulumi import snowflake:index/grantPrivilegesToDatabaseRole:GrantPrivilegesToDatabaseRole example '"test_db"."test_db_role"|false|false|CREATE TAG,CREATE TABLE|OnSchema|OnAllSchemasInDatabase|"test_db"'`
440
346
  ```
441
347
 
442
348
  #### Grant list of privileges on table
443
349
 
444
350
  ```sh
445
- $ pulumi import snowflake:index/grantPrivilegesToDatabaseRole:GrantPrivilegesToDatabaseRole \\"test_table\\""`
351
+ $ pulumi import snowflake:index/grantPrivilegesToDatabaseRole:GrantPrivilegesToDatabaseRole example '"test_db"."test_db_role"|false|false|SELECT,DELETE,INSERT|OnSchemaObject|OnObject|TABLE|"test_db"."test_schema"."test_table"'`
446
352
  ```
447
353
 
448
354
  #### Grant list of privileges OnAll tables in schema
449
355
 
450
356
  ```sh
451
- $ pulumi import snowflake:index/grantPrivilegesToDatabaseRole:GrantPrivilegesToDatabaseRole \\"test_schema\\""`
357
+ $ pulumi import snowflake:index/grantPrivilegesToDatabaseRole:GrantPrivilegesToDatabaseRole example '"test_db"."test_db_role"|false|false|SELECT,DELETE,INSERT|OnSchemaObject|OnAll|TABLES|InSchema|"test_db"."test_schema"'`
452
358
  ```
453
359
 
454
360
  :param str resource_name: The name of the resource.
455
361
  :param pulumi.ResourceOptions opts: Options for the resource.
456
362
  :param pulumi.Input[bool] all_privileges: Grant all privileges on the database role.
457
- :param pulumi.Input[bool] always_apply: If true, the resource will always produce a “plan” and on “apply” it will re-grant defined privileges. It is
458
- supposed to be used only in “grant privileges on all X’s in database / schema Y” or “grant all privileges to
459
- X” scenarios to make sure that every new object in a given database / schema is granted by the account role and every
460
- new privilege is granted to the database role. Important note: this flag is not compliant with the Terraform assumptions
461
- of the config being eventually convergent (producing an empty plan).
462
363
  :param pulumi.Input[str] always_apply_trigger: This is a helper field and should not be set. Its main purpose is to help to achieve the functionality described by the always_apply field.
463
- :param pulumi.Input[str] database_role_name: The fully qualified name of the database role to which privileges will be granted.
464
- :param pulumi.Input[str] on_database: The fully qualified name of the database on which privileges will be granted.
465
- :param pulumi.Input[pulumi.InputType['GrantPrivilegesToDatabaseRoleOnSchemaArgs']] on_schema: Specifies the schema on which privileges will be granted.
466
- :param pulumi.Input[pulumi.InputType['GrantPrivilegesToDatabaseRoleOnSchemaObjectArgs']] on_schema_object: Specifies the schema object on which privileges will be granted.
364
+ :param pulumi.Input[str] database_role_name: The fully qualified name of the database role to which privileges will be granted. For more information about this resource, see docs.
365
+ :param pulumi.Input[str] on_database: The fully qualified name of the database on which privileges will be granted. For more information about this resource, see docs.
366
+ :param pulumi.Input[Union['GrantPrivilegesToDatabaseRoleOnSchemaArgs', 'GrantPrivilegesToDatabaseRoleOnSchemaArgsDict']] on_schema: Specifies the schema on which privileges will be granted.
367
+ :param pulumi.Input[Union['GrantPrivilegesToDatabaseRoleOnSchemaObjectArgs', 'GrantPrivilegesToDatabaseRoleOnSchemaObjectArgsDict']] on_schema_object: Specifies the schema object on which privileges will be granted.
467
368
  :param pulumi.Input[Sequence[pulumi.Input[str]]] privileges: The privileges to grant on the database role.
468
369
  :param pulumi.Input[bool] with_grant_option: If specified, allows the recipient role to grant the privileges to other roles.
469
370
  """
@@ -474,81 +375,6 @@ class GrantPrivilegesToDatabaseRole(pulumi.CustomResource):
474
375
  args: GrantPrivilegesToDatabaseRoleArgs,
475
376
  opts: Optional[pulumi.ResourceOptions] = None):
476
377
  """
477
- > **Note** This is a preview resource. It's ready for general use. In case of any errors, please file an issue in our GitHub repository.
478
-
479
- !> **Warning** Be careful when using `always_apply` field. It will always produce a plan (even when no changes were made) and can be harmful in some setups. For more details why we decided to introduce it to go our document explaining those design decisions (coming soon).
480
-
481
- ## Example Usage
482
- ### on database privileges
483
- ##################################
484
-
485
- # list of privileges
486
- resource "snowflake_grant_privileges_to_database_role" "example" {
487
- privileges = ["CREATE", "MONITOR"]
488
- database_role_name = "\\"${snowflake_database_role.db_role.database}\\".\\"${snowflake_database_role.db_role.name}\\""
489
- on_database = snowflake_database_role.db_role.database
490
- }
491
-
492
- # all privileges + grant option
493
- resource "snowflake_grant_privileges_to_database_role" "example" {
494
- database_role_name = "\\"${snowflake_database_role.db_role.database}\\".\\"${snowflake_database_role.db_role.name}\\""
495
- on_database = snowflake_database_role.db_role.database
496
- all_privileges = true
497
- with_grant_option = true
498
- }
499
-
500
- # all privileges + grant option + always apply
501
- resource "snowflake_grant_privileges_to_database_role" "example" {
502
- database_role_name = "\\"${snowflake_database_role.db_role.database}\\".\\"${snowflake_database_role.db_role.name}\\""
503
- on_database = snowflake_database_role.db_role.database
504
- always_apply = true
505
- all_privileges = true
506
- with_grant_option = true
507
- }
508
-
509
- ##################################
510
- ### schema privileges
511
- ##################################
512
-
513
- # list of privileges
514
- resource "snowflake_grant_privileges_to_database_role" "example" {
515
- privileges = ["MODIFY", "CREATE TABLE"]
516
- database_role_name = "\\"${snowflake_database_role.db_role.database}\\".\\"${snowflake_database_role.db_role.name}\\""
517
- on_schema {
518
- schema_name = "\\"${snowflake_database_role.db_role.database}\\".\\"my_schema\\"" # note this is a fully qualified name!
519
- }
520
- }
521
-
522
- # all privileges + grant option
523
- resource "snowflake_grant_privileges_to_database_role" "example" {
524
- database_role_name = "\\"${snowflake_database_role.db_role.database}\\".\\"${snowflake_database_role.db_role.name}\\""
525
- on_schema {
526
- schema_name = "\\"${snowflake_database_role.db_role.database}\\".\\"my_schema\\"" # note this is a fully qualified name!
527
- }
528
- all_privileges = true
529
- with_grant_option = true
530
- }
531
-
532
- # all schemas in database
533
- resource "snowflake_grant_privileges_to_database_role" "example" {
534
- privileges = ["MODIFY", "CREATE TABLE"]
535
- database_role_name = "\\"${snowflake_database_role.db_role.database}\\".\\"${snowflake_database_role.db_role.name}\\""
536
- on_schema {
537
- all_schemas_in_database = snowflake_database_role.db_role.database
538
- }
539
- }
540
-
541
- # future schemas in database
542
- resource "snowflake_grant_privileges_to_database_role" "example" {
543
- privileges = ["MODIFY", "CREATE TABLE"]
544
- database_role_name = "\\"${snowflake_database_role.db_role.database}\\".\\"${snowflake_database_role.db_role.name}\\""
545
- on_schema {
546
- future_schemas_in_database = snowflake_database_role.db_role.database
547
- }
548
- }
549
-
550
- ##################################
551
-
552
378
  ## Import
553
379
 
554
380
  ### Import examples
@@ -556,25 +382,25 @@ class GrantPrivilegesToDatabaseRole(pulumi.CustomResource):
556
382
  #### Grant all privileges OnDatabase
557
383
 
558
384
  ```sh
559
- $ pulumi import snowflake:index/grantPrivilegesToDatabaseRole:GrantPrivilegesToDatabaseRole \\"test_db_role\\"|false|false|ALL|OnDatabase|\\"test_db\\""`
385
+ $ pulumi import snowflake:index/grantPrivilegesToDatabaseRole:GrantPrivilegesToDatabaseRole example '"test_db"."test_db_role"|false|false|ALL|OnDatabase|"test_db"'`
560
386
  ```
561
387
 
562
388
  #### Grant list of privileges OnAllSchemasInDatabase
563
389
 
564
390
  ```sh
565
- $ pulumi import snowflake:index/grantPrivilegesToDatabaseRole:GrantPrivilegesToDatabaseRole \\"test_db_role\\"|false|false|CREATE TAG,CREATE TABLE|OnSchema|OnAllSchemasInDatabase|\\"test_db\\""`
391
+ $ pulumi import snowflake:index/grantPrivilegesToDatabaseRole:GrantPrivilegesToDatabaseRole example '"test_db"."test_db_role"|false|false|CREATE TAG,CREATE TABLE|OnSchema|OnAllSchemasInDatabase|"test_db"'`
566
392
  ```
567
393
 
568
394
  #### Grant list of privileges on table
569
395
 
570
396
  ```sh
571
- $ pulumi import snowflake:index/grantPrivilegesToDatabaseRole:GrantPrivilegesToDatabaseRole \\"test_table\\""`
397
+ $ pulumi import snowflake:index/grantPrivilegesToDatabaseRole:GrantPrivilegesToDatabaseRole example '"test_db"."test_db_role"|false|false|SELECT,DELETE,INSERT|OnSchemaObject|OnObject|TABLE|"test_db"."test_schema"."test_table"'`
572
398
  ```
573
399
 
574
400
  #### Grant list of privileges OnAll tables in schema
575
401
 
576
402
  ```sh
577
- $ pulumi import snowflake:index/grantPrivilegesToDatabaseRole:GrantPrivilegesToDatabaseRole \\"test_schema\\""`
403
+ $ pulumi import snowflake:index/grantPrivilegesToDatabaseRole:GrantPrivilegesToDatabaseRole example '"test_db"."test_db_role"|false|false|SELECT,DELETE,INSERT|OnSchemaObject|OnAll|TABLES|InSchema|"test_db"."test_schema"'`
578
404
  ```
579
405
 
580
406
  :param str resource_name: The name of the resource.
@@ -597,8 +423,8 @@ class GrantPrivilegesToDatabaseRole(pulumi.CustomResource):
597
423
  always_apply_trigger: Optional[pulumi.Input[str]] = None,
598
424
  database_role_name: Optional[pulumi.Input[str]] = None,
599
425
  on_database: Optional[pulumi.Input[str]] = None,
600
- on_schema: Optional[pulumi.Input[pulumi.InputType['GrantPrivilegesToDatabaseRoleOnSchemaArgs']]] = None,
601
- on_schema_object: Optional[pulumi.Input[pulumi.InputType['GrantPrivilegesToDatabaseRoleOnSchemaObjectArgs']]] = None,
426
+ on_schema: Optional[pulumi.Input[Union['GrantPrivilegesToDatabaseRoleOnSchemaArgs', 'GrantPrivilegesToDatabaseRoleOnSchemaArgsDict']]] = None,
427
+ on_schema_object: Optional[pulumi.Input[Union['GrantPrivilegesToDatabaseRoleOnSchemaObjectArgs', 'GrantPrivilegesToDatabaseRoleOnSchemaObjectArgsDict']]] = None,
602
428
  privileges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
603
429
  with_grant_option: Optional[pulumi.Input[bool]] = None,
604
430
  __props__=None):
@@ -636,8 +462,8 @@ class GrantPrivilegesToDatabaseRole(pulumi.CustomResource):
636
462
  always_apply_trigger: Optional[pulumi.Input[str]] = None,
637
463
  database_role_name: Optional[pulumi.Input[str]] = None,
638
464
  on_database: Optional[pulumi.Input[str]] = None,
639
- on_schema: Optional[pulumi.Input[pulumi.InputType['GrantPrivilegesToDatabaseRoleOnSchemaArgs']]] = None,
640
- on_schema_object: Optional[pulumi.Input[pulumi.InputType['GrantPrivilegesToDatabaseRoleOnSchemaObjectArgs']]] = None,
465
+ on_schema: Optional[pulumi.Input[Union['GrantPrivilegesToDatabaseRoleOnSchemaArgs', 'GrantPrivilegesToDatabaseRoleOnSchemaArgsDict']]] = None,
466
+ on_schema_object: Optional[pulumi.Input[Union['GrantPrivilegesToDatabaseRoleOnSchemaObjectArgs', 'GrantPrivilegesToDatabaseRoleOnSchemaObjectArgsDict']]] = None,
641
467
  privileges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
642
468
  with_grant_option: Optional[pulumi.Input[bool]] = None) -> 'GrantPrivilegesToDatabaseRole':
643
469
  """
@@ -648,16 +474,11 @@ class GrantPrivilegesToDatabaseRole(pulumi.CustomResource):
648
474
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
649
475
  :param pulumi.ResourceOptions opts: Options for the resource.
650
476
  :param pulumi.Input[bool] all_privileges: Grant all privileges on the database role.
651
- :param pulumi.Input[bool] always_apply: If true, the resource will always produce a “plan” and on “apply” it will re-grant defined privileges. It is
652
- supposed to be used only in “grant privileges on all X’s in database / schema Y” or “grant all privileges to
653
- X” scenarios to make sure that every new object in a given database / schema is granted by the account role and every
654
- new privilege is granted to the database role. Important note: this flag is not compliant with the Terraform assumptions
655
- of the config being eventually convergent (producing an empty plan).
656
477
  :param pulumi.Input[str] always_apply_trigger: This is a helper field and should not be set. Its main purpose is to help to achieve the functionality described by the always_apply field.
657
- :param pulumi.Input[str] database_role_name: The fully qualified name of the database role to which privileges will be granted.
658
- :param pulumi.Input[str] on_database: The fully qualified name of the database on which privileges will be granted.
659
- :param pulumi.Input[pulumi.InputType['GrantPrivilegesToDatabaseRoleOnSchemaArgs']] on_schema: Specifies the schema on which privileges will be granted.
660
- :param pulumi.Input[pulumi.InputType['GrantPrivilegesToDatabaseRoleOnSchemaObjectArgs']] on_schema_object: Specifies the schema object on which privileges will be granted.
478
+ :param pulumi.Input[str] database_role_name: The fully qualified name of the database role to which privileges will be granted. For more information about this resource, see docs.
479
+ :param pulumi.Input[str] on_database: The fully qualified name of the database on which privileges will be granted. For more information about this resource, see docs.
480
+ :param pulumi.Input[Union['GrantPrivilegesToDatabaseRoleOnSchemaArgs', 'GrantPrivilegesToDatabaseRoleOnSchemaArgsDict']] on_schema: Specifies the schema on which privileges will be granted.
481
+ :param pulumi.Input[Union['GrantPrivilegesToDatabaseRoleOnSchemaObjectArgs', 'GrantPrivilegesToDatabaseRoleOnSchemaObjectArgsDict']] on_schema_object: Specifies the schema object on which privileges will be granted.
661
482
  :param pulumi.Input[Sequence[pulumi.Input[str]]] privileges: The privileges to grant on the database role.
662
483
  :param pulumi.Input[bool] with_grant_option: If specified, allows the recipient role to grant the privileges to other roles.
663
484
  """
@@ -687,13 +508,6 @@ class GrantPrivilegesToDatabaseRole(pulumi.CustomResource):
687
508
  @property
688
509
  @pulumi.getter(name="alwaysApply")
689
510
  def always_apply(self) -> pulumi.Output[Optional[bool]]:
690
- """
691
- If true, the resource will always produce a “plan” and on “apply” it will re-grant defined privileges. It is
692
- supposed to be used only in “grant privileges on all X’s in database / schema Y” or “grant all privileges to
693
- X” scenarios to make sure that every new object in a given database / schema is granted by the account role and every
694
- new privilege is granted to the database role. Important note: this flag is not compliant with the Terraform assumptions
695
- of the config being eventually convergent (producing an empty plan).
696
- """
697
511
  return pulumi.get(self, "always_apply")
698
512
 
699
513
  @property
@@ -708,7 +522,7 @@ class GrantPrivilegesToDatabaseRole(pulumi.CustomResource):
708
522
  @pulumi.getter(name="databaseRoleName")
709
523
  def database_role_name(self) -> pulumi.Output[str]:
710
524
  """
711
- The fully qualified name of the database role to which privileges will be granted.
525
+ The fully qualified name of the database role to which privileges will be granted. For more information about this resource, see docs.
712
526
  """
713
527
  return pulumi.get(self, "database_role_name")
714
528
 
@@ -716,7 +530,7 @@ class GrantPrivilegesToDatabaseRole(pulumi.CustomResource):
716
530
  @pulumi.getter(name="onDatabase")
717
531
  def on_database(self) -> pulumi.Output[Optional[str]]:
718
532
  """
719
- The fully qualified name of the database on which privileges will be granted.
533
+ The fully qualified name of the database on which privileges will be granted. For more information about this resource, see docs.
720
534
  """
721
535
  return pulumi.get(self, "on_database")
722
536