pulumi-vault 7.6.0a1764657486__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.
Files changed (274) hide show
  1. pulumi_vault/__init__.py +1399 -0
  2. pulumi_vault/_inputs.py +2701 -0
  3. pulumi_vault/_utilities.py +331 -0
  4. pulumi_vault/ad/__init__.py +12 -0
  5. pulumi_vault/ad/get_access_credentials.py +177 -0
  6. pulumi_vault/ad/secret_backend.py +1916 -0
  7. pulumi_vault/ad/secret_library.py +546 -0
  8. pulumi_vault/ad/secret_role.py +499 -0
  9. pulumi_vault/alicloud/__init__.py +9 -0
  10. pulumi_vault/alicloud/auth_backend_role.py +866 -0
  11. pulumi_vault/approle/__init__.py +12 -0
  12. pulumi_vault/approle/auth_backend_login.py +571 -0
  13. pulumi_vault/approle/auth_backend_role.py +1082 -0
  14. pulumi_vault/approle/auth_backend_role_secret_id.py +796 -0
  15. pulumi_vault/approle/get_auth_backend_role_id.py +169 -0
  16. pulumi_vault/audit.py +499 -0
  17. pulumi_vault/audit_request_header.py +277 -0
  18. pulumi_vault/auth_backend.py +565 -0
  19. pulumi_vault/aws/__init__.py +22 -0
  20. pulumi_vault/aws/auth_backend_cert.py +420 -0
  21. pulumi_vault/aws/auth_backend_client.py +1259 -0
  22. pulumi_vault/aws/auth_backend_config_identity.py +494 -0
  23. pulumi_vault/aws/auth_backend_identity_whitelist.py +380 -0
  24. pulumi_vault/aws/auth_backend_login.py +1046 -0
  25. pulumi_vault/aws/auth_backend_role.py +1961 -0
  26. pulumi_vault/aws/auth_backend_role_tag.py +638 -0
  27. pulumi_vault/aws/auth_backend_roletag_blacklist.py +366 -0
  28. pulumi_vault/aws/auth_backend_sts_role.py +414 -0
  29. pulumi_vault/aws/get_access_credentials.py +369 -0
  30. pulumi_vault/aws/get_static_access_credentials.py +137 -0
  31. pulumi_vault/aws/secret_backend.py +2018 -0
  32. pulumi_vault/aws/secret_backend_role.py +1188 -0
  33. pulumi_vault/aws/secret_backend_static_role.py +639 -0
  34. pulumi_vault/azure/__init__.py +15 -0
  35. pulumi_vault/azure/_inputs.py +108 -0
  36. pulumi_vault/azure/auth_backend_config.py +1096 -0
  37. pulumi_vault/azure/auth_backend_role.py +1176 -0
  38. pulumi_vault/azure/backend.py +1793 -0
  39. pulumi_vault/azure/backend_role.py +883 -0
  40. pulumi_vault/azure/get_access_credentials.py +400 -0
  41. pulumi_vault/azure/outputs.py +107 -0
  42. pulumi_vault/cert_auth_backend_role.py +1539 -0
  43. pulumi_vault/config/__init__.py +9 -0
  44. pulumi_vault/config/__init__.pyi +164 -0
  45. pulumi_vault/config/_inputs.py +73 -0
  46. pulumi_vault/config/outputs.py +1225 -0
  47. pulumi_vault/config/ui_custom_message.py +530 -0
  48. pulumi_vault/config/vars.py +230 -0
  49. pulumi_vault/consul/__init__.py +10 -0
  50. pulumi_vault/consul/secret_backend.py +1517 -0
  51. pulumi_vault/consul/secret_backend_role.py +847 -0
  52. pulumi_vault/database/__init__.py +14 -0
  53. pulumi_vault/database/_inputs.py +11907 -0
  54. pulumi_vault/database/outputs.py +8496 -0
  55. pulumi_vault/database/secret_backend_connection.py +1676 -0
  56. pulumi_vault/database/secret_backend_role.py +840 -0
  57. pulumi_vault/database/secret_backend_static_role.py +881 -0
  58. pulumi_vault/database/secrets_mount.py +2160 -0
  59. pulumi_vault/egp_policy.py +399 -0
  60. pulumi_vault/gcp/__init__.py +17 -0
  61. pulumi_vault/gcp/_inputs.py +441 -0
  62. pulumi_vault/gcp/auth_backend.py +1486 -0
  63. pulumi_vault/gcp/auth_backend_role.py +1235 -0
  64. pulumi_vault/gcp/get_auth_backend_role.py +514 -0
  65. pulumi_vault/gcp/outputs.py +302 -0
  66. pulumi_vault/gcp/secret_backend.py +1807 -0
  67. pulumi_vault/gcp/secret_impersonated_account.py +484 -0
  68. pulumi_vault/gcp/secret_roleset.py +554 -0
  69. pulumi_vault/gcp/secret_static_account.py +557 -0
  70. pulumi_vault/generic/__init__.py +11 -0
  71. pulumi_vault/generic/endpoint.py +786 -0
  72. pulumi_vault/generic/get_secret.py +306 -0
  73. pulumi_vault/generic/secret.py +486 -0
  74. pulumi_vault/get_auth_backend.py +226 -0
  75. pulumi_vault/get_auth_backends.py +170 -0
  76. pulumi_vault/get_namespace.py +226 -0
  77. pulumi_vault/get_namespaces.py +202 -0
  78. pulumi_vault/get_nomad_access_token.py +210 -0
  79. pulumi_vault/get_policy_document.py +160 -0
  80. pulumi_vault/get_raft_autopilot_state.py +267 -0
  81. pulumi_vault/github/__init__.py +13 -0
  82. pulumi_vault/github/_inputs.py +225 -0
  83. pulumi_vault/github/auth_backend.py +1194 -0
  84. pulumi_vault/github/outputs.py +174 -0
  85. pulumi_vault/github/team.py +380 -0
  86. pulumi_vault/github/user.py +380 -0
  87. pulumi_vault/identity/__init__.py +35 -0
  88. pulumi_vault/identity/entity.py +447 -0
  89. pulumi_vault/identity/entity_alias.py +398 -0
  90. pulumi_vault/identity/entity_policies.py +455 -0
  91. pulumi_vault/identity/get_entity.py +384 -0
  92. pulumi_vault/identity/get_group.py +467 -0
  93. pulumi_vault/identity/get_oidc_client_creds.py +175 -0
  94. pulumi_vault/identity/get_oidc_openid_config.py +334 -0
  95. pulumi_vault/identity/get_oidc_public_keys.py +179 -0
  96. pulumi_vault/identity/group.py +805 -0
  97. pulumi_vault/identity/group_alias.py +386 -0
  98. pulumi_vault/identity/group_member_entity_ids.py +444 -0
  99. pulumi_vault/identity/group_member_group_ids.py +467 -0
  100. pulumi_vault/identity/group_policies.py +471 -0
  101. pulumi_vault/identity/mfa_duo.py +674 -0
  102. pulumi_vault/identity/mfa_login_enforcement.py +566 -0
  103. pulumi_vault/identity/mfa_okta.py +626 -0
  104. pulumi_vault/identity/mfa_pingid.py +616 -0
  105. pulumi_vault/identity/mfa_totp.py +758 -0
  106. pulumi_vault/identity/oidc.py +268 -0
  107. pulumi_vault/identity/oidc_assignment.py +375 -0
  108. pulumi_vault/identity/oidc_client.py +667 -0
  109. pulumi_vault/identity/oidc_key.py +474 -0
  110. pulumi_vault/identity/oidc_key_allowed_client_id.py +298 -0
  111. pulumi_vault/identity/oidc_provider.py +550 -0
  112. pulumi_vault/identity/oidc_role.py +543 -0
  113. pulumi_vault/identity/oidc_scope.py +355 -0
  114. pulumi_vault/identity/outputs.py +137 -0
  115. pulumi_vault/jwt/__init__.py +12 -0
  116. pulumi_vault/jwt/_inputs.py +225 -0
  117. pulumi_vault/jwt/auth_backend.py +1347 -0
  118. pulumi_vault/jwt/auth_backend_role.py +1847 -0
  119. pulumi_vault/jwt/outputs.py +174 -0
  120. pulumi_vault/kmip/__init__.py +11 -0
  121. pulumi_vault/kmip/secret_backend.py +1591 -0
  122. pulumi_vault/kmip/secret_role.py +1194 -0
  123. pulumi_vault/kmip/secret_scope.py +372 -0
  124. pulumi_vault/kubernetes/__init__.py +15 -0
  125. pulumi_vault/kubernetes/auth_backend_config.py +654 -0
  126. pulumi_vault/kubernetes/auth_backend_role.py +1031 -0
  127. pulumi_vault/kubernetes/get_auth_backend_config.py +280 -0
  128. pulumi_vault/kubernetes/get_auth_backend_role.py +470 -0
  129. pulumi_vault/kubernetes/get_service_account_token.py +344 -0
  130. pulumi_vault/kubernetes/secret_backend.py +1341 -0
  131. pulumi_vault/kubernetes/secret_backend_role.py +1140 -0
  132. pulumi_vault/kv/__init__.py +18 -0
  133. pulumi_vault/kv/_inputs.py +124 -0
  134. pulumi_vault/kv/get_secret.py +240 -0
  135. pulumi_vault/kv/get_secret_subkeys_v2.py +275 -0
  136. pulumi_vault/kv/get_secret_v2.py +315 -0
  137. pulumi_vault/kv/get_secrets_list.py +186 -0
  138. pulumi_vault/kv/get_secrets_list_v2.py +243 -0
  139. pulumi_vault/kv/outputs.py +102 -0
  140. pulumi_vault/kv/secret.py +397 -0
  141. pulumi_vault/kv/secret_backend_v2.py +455 -0
  142. pulumi_vault/kv/secret_v2.py +970 -0
  143. pulumi_vault/ldap/__init__.py +19 -0
  144. pulumi_vault/ldap/_inputs.py +225 -0
  145. pulumi_vault/ldap/auth_backend.py +2520 -0
  146. pulumi_vault/ldap/auth_backend_group.py +386 -0
  147. pulumi_vault/ldap/auth_backend_user.py +439 -0
  148. pulumi_vault/ldap/get_dynamic_credentials.py +181 -0
  149. pulumi_vault/ldap/get_static_credentials.py +192 -0
  150. pulumi_vault/ldap/outputs.py +174 -0
  151. pulumi_vault/ldap/secret_backend.py +2207 -0
  152. pulumi_vault/ldap/secret_backend_dynamic_role.py +767 -0
  153. pulumi_vault/ldap/secret_backend_library_set.py +552 -0
  154. pulumi_vault/ldap/secret_backend_static_role.py +541 -0
  155. pulumi_vault/managed/__init__.py +11 -0
  156. pulumi_vault/managed/_inputs.py +944 -0
  157. pulumi_vault/managed/keys.py +398 -0
  158. pulumi_vault/managed/outputs.py +667 -0
  159. pulumi_vault/mfa_duo.py +589 -0
  160. pulumi_vault/mfa_okta.py +623 -0
  161. pulumi_vault/mfa_pingid.py +670 -0
  162. pulumi_vault/mfa_totp.py +620 -0
  163. pulumi_vault/mongodbatlas/__init__.py +10 -0
  164. pulumi_vault/mongodbatlas/secret_backend.py +388 -0
  165. pulumi_vault/mongodbatlas/secret_role.py +726 -0
  166. pulumi_vault/mount.py +1262 -0
  167. pulumi_vault/namespace.py +452 -0
  168. pulumi_vault/nomad_secret_backend.py +1559 -0
  169. pulumi_vault/nomad_secret_role.py +489 -0
  170. pulumi_vault/oci_auth_backend.py +676 -0
  171. pulumi_vault/oci_auth_backend_role.py +852 -0
  172. pulumi_vault/okta/__init__.py +13 -0
  173. pulumi_vault/okta/_inputs.py +320 -0
  174. pulumi_vault/okta/auth_backend.py +1231 -0
  175. pulumi_vault/okta/auth_backend_group.py +369 -0
  176. pulumi_vault/okta/auth_backend_user.py +416 -0
  177. pulumi_vault/okta/outputs.py +244 -0
  178. pulumi_vault/outputs.py +502 -0
  179. pulumi_vault/pkisecret/__init__.py +38 -0
  180. pulumi_vault/pkisecret/_inputs.py +270 -0
  181. pulumi_vault/pkisecret/backend_acme_eab.py +550 -0
  182. pulumi_vault/pkisecret/backend_config_acme.py +690 -0
  183. pulumi_vault/pkisecret/backend_config_auto_tidy.py +1370 -0
  184. pulumi_vault/pkisecret/backend_config_cluster.py +370 -0
  185. pulumi_vault/pkisecret/backend_config_cmpv2.py +693 -0
  186. pulumi_vault/pkisecret/backend_config_est.py +756 -0
  187. pulumi_vault/pkisecret/backend_config_scep.py +738 -0
  188. pulumi_vault/pkisecret/get_backend_cert_metadata.py +277 -0
  189. pulumi_vault/pkisecret/get_backend_config_cmpv2.py +226 -0
  190. pulumi_vault/pkisecret/get_backend_config_est.py +251 -0
  191. pulumi_vault/pkisecret/get_backend_config_scep.py +271 -0
  192. pulumi_vault/pkisecret/get_backend_issuer.py +395 -0
  193. pulumi_vault/pkisecret/get_backend_issuers.py +192 -0
  194. pulumi_vault/pkisecret/get_backend_key.py +211 -0
  195. pulumi_vault/pkisecret/get_backend_keys.py +192 -0
  196. pulumi_vault/pkisecret/outputs.py +270 -0
  197. pulumi_vault/pkisecret/secret_backend_cert.py +1315 -0
  198. pulumi_vault/pkisecret/secret_backend_config_ca.py +386 -0
  199. pulumi_vault/pkisecret/secret_backend_config_issuers.py +392 -0
  200. pulumi_vault/pkisecret/secret_backend_config_urls.py +462 -0
  201. pulumi_vault/pkisecret/secret_backend_crl_config.py +846 -0
  202. pulumi_vault/pkisecret/secret_backend_intermediate_cert_request.py +1629 -0
  203. pulumi_vault/pkisecret/secret_backend_intermediate_set_signed.py +444 -0
  204. pulumi_vault/pkisecret/secret_backend_issuer.py +1089 -0
  205. pulumi_vault/pkisecret/secret_backend_key.py +613 -0
  206. pulumi_vault/pkisecret/secret_backend_role.py +2694 -0
  207. pulumi_vault/pkisecret/secret_backend_root_cert.py +2134 -0
  208. pulumi_vault/pkisecret/secret_backend_root_sign_intermediate.py +2031 -0
  209. pulumi_vault/pkisecret/secret_backend_sign.py +1194 -0
  210. pulumi_vault/plugin.py +596 -0
  211. pulumi_vault/plugin_pinned_version.py +299 -0
  212. pulumi_vault/policy.py +279 -0
  213. pulumi_vault/provider.py +781 -0
  214. pulumi_vault/pulumi-plugin.json +5 -0
  215. pulumi_vault/py.typed +0 -0
  216. pulumi_vault/quota_lease_count.py +504 -0
  217. pulumi_vault/quota_rate_limit.py +751 -0
  218. pulumi_vault/rabbitmq/__init__.py +12 -0
  219. pulumi_vault/rabbitmq/_inputs.py +235 -0
  220. pulumi_vault/rabbitmq/outputs.py +144 -0
  221. pulumi_vault/rabbitmq/secret_backend.py +1437 -0
  222. pulumi_vault/rabbitmq/secret_backend_role.py +496 -0
  223. pulumi_vault/raft_autopilot.py +609 -0
  224. pulumi_vault/raft_snapshot_agent_config.py +1591 -0
  225. pulumi_vault/rgp_policy.py +349 -0
  226. pulumi_vault/saml/__init__.py +12 -0
  227. pulumi_vault/saml/_inputs.py +225 -0
  228. pulumi_vault/saml/auth_backend.py +811 -0
  229. pulumi_vault/saml/auth_backend_role.py +1068 -0
  230. pulumi_vault/saml/outputs.py +174 -0
  231. pulumi_vault/scep_auth_backend_role.py +908 -0
  232. pulumi_vault/secrets/__init__.py +18 -0
  233. pulumi_vault/secrets/_inputs.py +110 -0
  234. pulumi_vault/secrets/outputs.py +94 -0
  235. pulumi_vault/secrets/sync_association.py +450 -0
  236. pulumi_vault/secrets/sync_aws_destination.py +780 -0
  237. pulumi_vault/secrets/sync_azure_destination.py +736 -0
  238. pulumi_vault/secrets/sync_config.py +303 -0
  239. pulumi_vault/secrets/sync_gcp_destination.py +572 -0
  240. pulumi_vault/secrets/sync_gh_destination.py +688 -0
  241. pulumi_vault/secrets/sync_github_apps.py +376 -0
  242. pulumi_vault/secrets/sync_vercel_destination.py +603 -0
  243. pulumi_vault/ssh/__init__.py +13 -0
  244. pulumi_vault/ssh/_inputs.py +76 -0
  245. pulumi_vault/ssh/get_secret_backend_sign.py +294 -0
  246. pulumi_vault/ssh/outputs.py +51 -0
  247. pulumi_vault/ssh/secret_backend_ca.py +588 -0
  248. pulumi_vault/ssh/secret_backend_role.py +1493 -0
  249. pulumi_vault/terraformcloud/__init__.py +11 -0
  250. pulumi_vault/terraformcloud/secret_backend.py +1321 -0
  251. pulumi_vault/terraformcloud/secret_creds.py +445 -0
  252. pulumi_vault/terraformcloud/secret_role.py +563 -0
  253. pulumi_vault/token.py +1026 -0
  254. pulumi_vault/tokenauth/__init__.py +9 -0
  255. pulumi_vault/tokenauth/auth_backend_role.py +1135 -0
  256. pulumi_vault/transform/__init__.py +14 -0
  257. pulumi_vault/transform/alphabet.py +348 -0
  258. pulumi_vault/transform/get_decode.py +287 -0
  259. pulumi_vault/transform/get_encode.py +291 -0
  260. pulumi_vault/transform/role.py +350 -0
  261. pulumi_vault/transform/template.py +592 -0
  262. pulumi_vault/transform/transformation.py +608 -0
  263. pulumi_vault/transit/__init__.py +15 -0
  264. pulumi_vault/transit/get_cmac.py +256 -0
  265. pulumi_vault/transit/get_decrypt.py +181 -0
  266. pulumi_vault/transit/get_encrypt.py +174 -0
  267. pulumi_vault/transit/get_sign.py +328 -0
  268. pulumi_vault/transit/get_verify.py +373 -0
  269. pulumi_vault/transit/secret_backend_key.py +1202 -0
  270. pulumi_vault/transit/secret_cache_config.py +302 -0
  271. pulumi_vault-7.6.0a1764657486.dist-info/METADATA +92 -0
  272. pulumi_vault-7.6.0a1764657486.dist-info/RECORD +274 -0
  273. pulumi_vault-7.6.0a1764657486.dist-info/WHEEL +5 -0
  274. pulumi_vault-7.6.0a1764657486.dist-info/top_level.txt +1 -0
@@ -0,0 +1,881 @@
1
+ # coding=utf-8
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
+ # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+
5
+ import builtins as _builtins
6
+ import warnings
7
+ import sys
8
+ import pulumi
9
+ import pulumi.runtime
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
15
+ from .. import _utilities
16
+
17
+ __all__ = ['SecretBackendStaticRoleArgs', 'SecretBackendStaticRole']
18
+
19
+ @pulumi.input_type
20
+ class SecretBackendStaticRoleArgs:
21
+ def __init__(__self__, *,
22
+ backend: pulumi.Input[_builtins.str],
23
+ db_name: pulumi.Input[_builtins.str],
24
+ username: pulumi.Input[_builtins.str],
25
+ credential_config: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
26
+ credential_type: Optional[pulumi.Input[_builtins.str]] = None,
27
+ name: Optional[pulumi.Input[_builtins.str]] = None,
28
+ namespace: Optional[pulumi.Input[_builtins.str]] = None,
29
+ rotation_period: Optional[pulumi.Input[_builtins.int]] = None,
30
+ rotation_schedule: Optional[pulumi.Input[_builtins.str]] = None,
31
+ rotation_statements: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
32
+ rotation_window: Optional[pulumi.Input[_builtins.int]] = None,
33
+ self_managed_password: Optional[pulumi.Input[_builtins.str]] = None,
34
+ skip_import_rotation: Optional[pulumi.Input[_builtins.bool]] = None):
35
+ """
36
+ The set of arguments for constructing a SecretBackendStaticRole resource.
37
+ :param pulumi.Input[_builtins.str] backend: The unique name of the Vault mount to configure.
38
+ :param pulumi.Input[_builtins.str] db_name: The unique name of the database connection to use for the static role.
39
+ :param pulumi.Input[_builtins.str] username: The database username that this static role corresponds to.
40
+ :param pulumi.Input[_builtins.str] credential_type: The credential type for the user, can be one of "password", "rsa_private_key" or "client_certificate".The configuration can be done in `credential_config`.
41
+ :param pulumi.Input[_builtins.str] name: A unique name to give the static role.
42
+ :param pulumi.Input[_builtins.str] namespace: The namespace to provision the resource in.
43
+ The value should not contain leading or trailing forward slashes.
44
+ The `namespace` is always relative to the provider's configured namespace.
45
+ *Available only for Vault Enterprise*.
46
+ :param pulumi.Input[_builtins.int] rotation_period: The amount of time Vault should wait before rotating the password, in seconds.
47
+ Mutually exclusive with `rotation_schedule`.
48
+ :param pulumi.Input[_builtins.str] rotation_schedule: A cron-style string that will define the schedule on which rotations should occur.
49
+ Mutually exclusive with `rotation_period`.
50
+
51
+ **Warning**: The `rotation_period` and `rotation_schedule` fields are
52
+ mutually exclusive. One of them must be set but not both.
53
+ :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] rotation_statements: Database statements to execute to rotate the password for the configured database user.
54
+ :param pulumi.Input[_builtins.int] rotation_window: The amount of time, in seconds, in which rotations are allowed to occur starting
55
+ from a given `rotation_schedule`.
56
+ :param pulumi.Input[_builtins.str] self_managed_password: The password corresponding to the username in the database.
57
+ Required when using the Rootless Password Rotation workflow for static roles. Only enabled for
58
+ select DB engines (Postgres). Requires Vault 1.18+ Enterprise.
59
+ :param pulumi.Input[_builtins.bool] skip_import_rotation: If set to true, Vault will skip the
60
+ initial secret rotation on import. Requires Vault 1.18+ Enterprise.
61
+ """
62
+ pulumi.set(__self__, "backend", backend)
63
+ pulumi.set(__self__, "db_name", db_name)
64
+ pulumi.set(__self__, "username", username)
65
+ if credential_config is not None:
66
+ pulumi.set(__self__, "credential_config", credential_config)
67
+ if credential_type is not None:
68
+ pulumi.set(__self__, "credential_type", credential_type)
69
+ if name is not None:
70
+ pulumi.set(__self__, "name", name)
71
+ if namespace is not None:
72
+ pulumi.set(__self__, "namespace", namespace)
73
+ if rotation_period is not None:
74
+ pulumi.set(__self__, "rotation_period", rotation_period)
75
+ if rotation_schedule is not None:
76
+ pulumi.set(__self__, "rotation_schedule", rotation_schedule)
77
+ if rotation_statements is not None:
78
+ pulumi.set(__self__, "rotation_statements", rotation_statements)
79
+ if rotation_window is not None:
80
+ pulumi.set(__self__, "rotation_window", rotation_window)
81
+ if self_managed_password is not None:
82
+ pulumi.set(__self__, "self_managed_password", self_managed_password)
83
+ if skip_import_rotation is not None:
84
+ pulumi.set(__self__, "skip_import_rotation", skip_import_rotation)
85
+
86
+ @_builtins.property
87
+ @pulumi.getter
88
+ def backend(self) -> pulumi.Input[_builtins.str]:
89
+ """
90
+ The unique name of the Vault mount to configure.
91
+ """
92
+ return pulumi.get(self, "backend")
93
+
94
+ @backend.setter
95
+ def backend(self, value: pulumi.Input[_builtins.str]):
96
+ pulumi.set(self, "backend", value)
97
+
98
+ @_builtins.property
99
+ @pulumi.getter(name="dbName")
100
+ def db_name(self) -> pulumi.Input[_builtins.str]:
101
+ """
102
+ The unique name of the database connection to use for the static role.
103
+ """
104
+ return pulumi.get(self, "db_name")
105
+
106
+ @db_name.setter
107
+ def db_name(self, value: pulumi.Input[_builtins.str]):
108
+ pulumi.set(self, "db_name", value)
109
+
110
+ @_builtins.property
111
+ @pulumi.getter
112
+ def username(self) -> pulumi.Input[_builtins.str]:
113
+ """
114
+ The database username that this static role corresponds to.
115
+ """
116
+ return pulumi.get(self, "username")
117
+
118
+ @username.setter
119
+ def username(self, value: pulumi.Input[_builtins.str]):
120
+ pulumi.set(self, "username", value)
121
+
122
+ @_builtins.property
123
+ @pulumi.getter(name="credentialConfig")
124
+ def credential_config(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]:
125
+ return pulumi.get(self, "credential_config")
126
+
127
+ @credential_config.setter
128
+ def credential_config(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]):
129
+ pulumi.set(self, "credential_config", value)
130
+
131
+ @_builtins.property
132
+ @pulumi.getter(name="credentialType")
133
+ def credential_type(self) -> Optional[pulumi.Input[_builtins.str]]:
134
+ """
135
+ The credential type for the user, can be one of "password", "rsa_private_key" or "client_certificate".The configuration can be done in `credential_config`.
136
+ """
137
+ return pulumi.get(self, "credential_type")
138
+
139
+ @credential_type.setter
140
+ def credential_type(self, value: Optional[pulumi.Input[_builtins.str]]):
141
+ pulumi.set(self, "credential_type", value)
142
+
143
+ @_builtins.property
144
+ @pulumi.getter
145
+ def name(self) -> Optional[pulumi.Input[_builtins.str]]:
146
+ """
147
+ A unique name to give the static role.
148
+ """
149
+ return pulumi.get(self, "name")
150
+
151
+ @name.setter
152
+ def name(self, value: Optional[pulumi.Input[_builtins.str]]):
153
+ pulumi.set(self, "name", value)
154
+
155
+ @_builtins.property
156
+ @pulumi.getter
157
+ def namespace(self) -> Optional[pulumi.Input[_builtins.str]]:
158
+ """
159
+ The namespace to provision the resource in.
160
+ The value should not contain leading or trailing forward slashes.
161
+ The `namespace` is always relative to the provider's configured namespace.
162
+ *Available only for Vault Enterprise*.
163
+ """
164
+ return pulumi.get(self, "namespace")
165
+
166
+ @namespace.setter
167
+ def namespace(self, value: Optional[pulumi.Input[_builtins.str]]):
168
+ pulumi.set(self, "namespace", value)
169
+
170
+ @_builtins.property
171
+ @pulumi.getter(name="rotationPeriod")
172
+ def rotation_period(self) -> Optional[pulumi.Input[_builtins.int]]:
173
+ """
174
+ The amount of time Vault should wait before rotating the password, in seconds.
175
+ Mutually exclusive with `rotation_schedule`.
176
+ """
177
+ return pulumi.get(self, "rotation_period")
178
+
179
+ @rotation_period.setter
180
+ def rotation_period(self, value: Optional[pulumi.Input[_builtins.int]]):
181
+ pulumi.set(self, "rotation_period", value)
182
+
183
+ @_builtins.property
184
+ @pulumi.getter(name="rotationSchedule")
185
+ def rotation_schedule(self) -> Optional[pulumi.Input[_builtins.str]]:
186
+ """
187
+ A cron-style string that will define the schedule on which rotations should occur.
188
+ Mutually exclusive with `rotation_period`.
189
+
190
+ **Warning**: The `rotation_period` and `rotation_schedule` fields are
191
+ mutually exclusive. One of them must be set but not both.
192
+ """
193
+ return pulumi.get(self, "rotation_schedule")
194
+
195
+ @rotation_schedule.setter
196
+ def rotation_schedule(self, value: Optional[pulumi.Input[_builtins.str]]):
197
+ pulumi.set(self, "rotation_schedule", value)
198
+
199
+ @_builtins.property
200
+ @pulumi.getter(name="rotationStatements")
201
+ def rotation_statements(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]:
202
+ """
203
+ Database statements to execute to rotate the password for the configured database user.
204
+ """
205
+ return pulumi.get(self, "rotation_statements")
206
+
207
+ @rotation_statements.setter
208
+ def rotation_statements(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]):
209
+ pulumi.set(self, "rotation_statements", value)
210
+
211
+ @_builtins.property
212
+ @pulumi.getter(name="rotationWindow")
213
+ def rotation_window(self) -> Optional[pulumi.Input[_builtins.int]]:
214
+ """
215
+ The amount of time, in seconds, in which rotations are allowed to occur starting
216
+ from a given `rotation_schedule`.
217
+ """
218
+ return pulumi.get(self, "rotation_window")
219
+
220
+ @rotation_window.setter
221
+ def rotation_window(self, value: Optional[pulumi.Input[_builtins.int]]):
222
+ pulumi.set(self, "rotation_window", value)
223
+
224
+ @_builtins.property
225
+ @pulumi.getter(name="selfManagedPassword")
226
+ def self_managed_password(self) -> Optional[pulumi.Input[_builtins.str]]:
227
+ """
228
+ The password corresponding to the username in the database.
229
+ Required when using the Rootless Password Rotation workflow for static roles. Only enabled for
230
+ select DB engines (Postgres). Requires Vault 1.18+ Enterprise.
231
+ """
232
+ return pulumi.get(self, "self_managed_password")
233
+
234
+ @self_managed_password.setter
235
+ def self_managed_password(self, value: Optional[pulumi.Input[_builtins.str]]):
236
+ pulumi.set(self, "self_managed_password", value)
237
+
238
+ @_builtins.property
239
+ @pulumi.getter(name="skipImportRotation")
240
+ def skip_import_rotation(self) -> Optional[pulumi.Input[_builtins.bool]]:
241
+ """
242
+ If set to true, Vault will skip the
243
+ initial secret rotation on import. Requires Vault 1.18+ Enterprise.
244
+ """
245
+ return pulumi.get(self, "skip_import_rotation")
246
+
247
+ @skip_import_rotation.setter
248
+ def skip_import_rotation(self, value: Optional[pulumi.Input[_builtins.bool]]):
249
+ pulumi.set(self, "skip_import_rotation", value)
250
+
251
+
252
+ @pulumi.input_type
253
+ class _SecretBackendStaticRoleState:
254
+ def __init__(__self__, *,
255
+ backend: Optional[pulumi.Input[_builtins.str]] = None,
256
+ credential_config: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
257
+ credential_type: Optional[pulumi.Input[_builtins.str]] = None,
258
+ db_name: Optional[pulumi.Input[_builtins.str]] = None,
259
+ name: Optional[pulumi.Input[_builtins.str]] = None,
260
+ namespace: Optional[pulumi.Input[_builtins.str]] = None,
261
+ rotation_period: Optional[pulumi.Input[_builtins.int]] = None,
262
+ rotation_schedule: Optional[pulumi.Input[_builtins.str]] = None,
263
+ rotation_statements: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
264
+ rotation_window: Optional[pulumi.Input[_builtins.int]] = None,
265
+ self_managed_password: Optional[pulumi.Input[_builtins.str]] = None,
266
+ skip_import_rotation: Optional[pulumi.Input[_builtins.bool]] = None,
267
+ username: Optional[pulumi.Input[_builtins.str]] = None):
268
+ """
269
+ Input properties used for looking up and filtering SecretBackendStaticRole resources.
270
+ :param pulumi.Input[_builtins.str] backend: The unique name of the Vault mount to configure.
271
+ :param pulumi.Input[_builtins.str] credential_type: The credential type for the user, can be one of "password", "rsa_private_key" or "client_certificate".The configuration can be done in `credential_config`.
272
+ :param pulumi.Input[_builtins.str] db_name: The unique name of the database connection to use for the static role.
273
+ :param pulumi.Input[_builtins.str] name: A unique name to give the static role.
274
+ :param pulumi.Input[_builtins.str] namespace: The namespace to provision the resource in.
275
+ The value should not contain leading or trailing forward slashes.
276
+ The `namespace` is always relative to the provider's configured namespace.
277
+ *Available only for Vault Enterprise*.
278
+ :param pulumi.Input[_builtins.int] rotation_period: The amount of time Vault should wait before rotating the password, in seconds.
279
+ Mutually exclusive with `rotation_schedule`.
280
+ :param pulumi.Input[_builtins.str] rotation_schedule: A cron-style string that will define the schedule on which rotations should occur.
281
+ Mutually exclusive with `rotation_period`.
282
+
283
+ **Warning**: The `rotation_period` and `rotation_schedule` fields are
284
+ mutually exclusive. One of them must be set but not both.
285
+ :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] rotation_statements: Database statements to execute to rotate the password for the configured database user.
286
+ :param pulumi.Input[_builtins.int] rotation_window: The amount of time, in seconds, in which rotations are allowed to occur starting
287
+ from a given `rotation_schedule`.
288
+ :param pulumi.Input[_builtins.str] self_managed_password: The password corresponding to the username in the database.
289
+ Required when using the Rootless Password Rotation workflow for static roles. Only enabled for
290
+ select DB engines (Postgres). Requires Vault 1.18+ Enterprise.
291
+ :param pulumi.Input[_builtins.bool] skip_import_rotation: If set to true, Vault will skip the
292
+ initial secret rotation on import. Requires Vault 1.18+ Enterprise.
293
+ :param pulumi.Input[_builtins.str] username: The database username that this static role corresponds to.
294
+ """
295
+ if backend is not None:
296
+ pulumi.set(__self__, "backend", backend)
297
+ if credential_config is not None:
298
+ pulumi.set(__self__, "credential_config", credential_config)
299
+ if credential_type is not None:
300
+ pulumi.set(__self__, "credential_type", credential_type)
301
+ if db_name is not None:
302
+ pulumi.set(__self__, "db_name", db_name)
303
+ if name is not None:
304
+ pulumi.set(__self__, "name", name)
305
+ if namespace is not None:
306
+ pulumi.set(__self__, "namespace", namespace)
307
+ if rotation_period is not None:
308
+ pulumi.set(__self__, "rotation_period", rotation_period)
309
+ if rotation_schedule is not None:
310
+ pulumi.set(__self__, "rotation_schedule", rotation_schedule)
311
+ if rotation_statements is not None:
312
+ pulumi.set(__self__, "rotation_statements", rotation_statements)
313
+ if rotation_window is not None:
314
+ pulumi.set(__self__, "rotation_window", rotation_window)
315
+ if self_managed_password is not None:
316
+ pulumi.set(__self__, "self_managed_password", self_managed_password)
317
+ if skip_import_rotation is not None:
318
+ pulumi.set(__self__, "skip_import_rotation", skip_import_rotation)
319
+ if username is not None:
320
+ pulumi.set(__self__, "username", username)
321
+
322
+ @_builtins.property
323
+ @pulumi.getter
324
+ def backend(self) -> Optional[pulumi.Input[_builtins.str]]:
325
+ """
326
+ The unique name of the Vault mount to configure.
327
+ """
328
+ return pulumi.get(self, "backend")
329
+
330
+ @backend.setter
331
+ def backend(self, value: Optional[pulumi.Input[_builtins.str]]):
332
+ pulumi.set(self, "backend", value)
333
+
334
+ @_builtins.property
335
+ @pulumi.getter(name="credentialConfig")
336
+ def credential_config(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]:
337
+ return pulumi.get(self, "credential_config")
338
+
339
+ @credential_config.setter
340
+ def credential_config(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]):
341
+ pulumi.set(self, "credential_config", value)
342
+
343
+ @_builtins.property
344
+ @pulumi.getter(name="credentialType")
345
+ def credential_type(self) -> Optional[pulumi.Input[_builtins.str]]:
346
+ """
347
+ The credential type for the user, can be one of "password", "rsa_private_key" or "client_certificate".The configuration can be done in `credential_config`.
348
+ """
349
+ return pulumi.get(self, "credential_type")
350
+
351
+ @credential_type.setter
352
+ def credential_type(self, value: Optional[pulumi.Input[_builtins.str]]):
353
+ pulumi.set(self, "credential_type", value)
354
+
355
+ @_builtins.property
356
+ @pulumi.getter(name="dbName")
357
+ def db_name(self) -> Optional[pulumi.Input[_builtins.str]]:
358
+ """
359
+ The unique name of the database connection to use for the static role.
360
+ """
361
+ return pulumi.get(self, "db_name")
362
+
363
+ @db_name.setter
364
+ def db_name(self, value: Optional[pulumi.Input[_builtins.str]]):
365
+ pulumi.set(self, "db_name", value)
366
+
367
+ @_builtins.property
368
+ @pulumi.getter
369
+ def name(self) -> Optional[pulumi.Input[_builtins.str]]:
370
+ """
371
+ A unique name to give the static role.
372
+ """
373
+ return pulumi.get(self, "name")
374
+
375
+ @name.setter
376
+ def name(self, value: Optional[pulumi.Input[_builtins.str]]):
377
+ pulumi.set(self, "name", value)
378
+
379
+ @_builtins.property
380
+ @pulumi.getter
381
+ def namespace(self) -> Optional[pulumi.Input[_builtins.str]]:
382
+ """
383
+ The namespace to provision the resource in.
384
+ The value should not contain leading or trailing forward slashes.
385
+ The `namespace` is always relative to the provider's configured namespace.
386
+ *Available only for Vault Enterprise*.
387
+ """
388
+ return pulumi.get(self, "namespace")
389
+
390
+ @namespace.setter
391
+ def namespace(self, value: Optional[pulumi.Input[_builtins.str]]):
392
+ pulumi.set(self, "namespace", value)
393
+
394
+ @_builtins.property
395
+ @pulumi.getter(name="rotationPeriod")
396
+ def rotation_period(self) -> Optional[pulumi.Input[_builtins.int]]:
397
+ """
398
+ The amount of time Vault should wait before rotating the password, in seconds.
399
+ Mutually exclusive with `rotation_schedule`.
400
+ """
401
+ return pulumi.get(self, "rotation_period")
402
+
403
+ @rotation_period.setter
404
+ def rotation_period(self, value: Optional[pulumi.Input[_builtins.int]]):
405
+ pulumi.set(self, "rotation_period", value)
406
+
407
+ @_builtins.property
408
+ @pulumi.getter(name="rotationSchedule")
409
+ def rotation_schedule(self) -> Optional[pulumi.Input[_builtins.str]]:
410
+ """
411
+ A cron-style string that will define the schedule on which rotations should occur.
412
+ Mutually exclusive with `rotation_period`.
413
+
414
+ **Warning**: The `rotation_period` and `rotation_schedule` fields are
415
+ mutually exclusive. One of them must be set but not both.
416
+ """
417
+ return pulumi.get(self, "rotation_schedule")
418
+
419
+ @rotation_schedule.setter
420
+ def rotation_schedule(self, value: Optional[pulumi.Input[_builtins.str]]):
421
+ pulumi.set(self, "rotation_schedule", value)
422
+
423
+ @_builtins.property
424
+ @pulumi.getter(name="rotationStatements")
425
+ def rotation_statements(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]:
426
+ """
427
+ Database statements to execute to rotate the password for the configured database user.
428
+ """
429
+ return pulumi.get(self, "rotation_statements")
430
+
431
+ @rotation_statements.setter
432
+ def rotation_statements(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]):
433
+ pulumi.set(self, "rotation_statements", value)
434
+
435
+ @_builtins.property
436
+ @pulumi.getter(name="rotationWindow")
437
+ def rotation_window(self) -> Optional[pulumi.Input[_builtins.int]]:
438
+ """
439
+ The amount of time, in seconds, in which rotations are allowed to occur starting
440
+ from a given `rotation_schedule`.
441
+ """
442
+ return pulumi.get(self, "rotation_window")
443
+
444
+ @rotation_window.setter
445
+ def rotation_window(self, value: Optional[pulumi.Input[_builtins.int]]):
446
+ pulumi.set(self, "rotation_window", value)
447
+
448
+ @_builtins.property
449
+ @pulumi.getter(name="selfManagedPassword")
450
+ def self_managed_password(self) -> Optional[pulumi.Input[_builtins.str]]:
451
+ """
452
+ The password corresponding to the username in the database.
453
+ Required when using the Rootless Password Rotation workflow for static roles. Only enabled for
454
+ select DB engines (Postgres). Requires Vault 1.18+ Enterprise.
455
+ """
456
+ return pulumi.get(self, "self_managed_password")
457
+
458
+ @self_managed_password.setter
459
+ def self_managed_password(self, value: Optional[pulumi.Input[_builtins.str]]):
460
+ pulumi.set(self, "self_managed_password", value)
461
+
462
+ @_builtins.property
463
+ @pulumi.getter(name="skipImportRotation")
464
+ def skip_import_rotation(self) -> Optional[pulumi.Input[_builtins.bool]]:
465
+ """
466
+ If set to true, Vault will skip the
467
+ initial secret rotation on import. Requires Vault 1.18+ Enterprise.
468
+ """
469
+ return pulumi.get(self, "skip_import_rotation")
470
+
471
+ @skip_import_rotation.setter
472
+ def skip_import_rotation(self, value: Optional[pulumi.Input[_builtins.bool]]):
473
+ pulumi.set(self, "skip_import_rotation", value)
474
+
475
+ @_builtins.property
476
+ @pulumi.getter
477
+ def username(self) -> Optional[pulumi.Input[_builtins.str]]:
478
+ """
479
+ The database username that this static role corresponds to.
480
+ """
481
+ return pulumi.get(self, "username")
482
+
483
+ @username.setter
484
+ def username(self, value: Optional[pulumi.Input[_builtins.str]]):
485
+ pulumi.set(self, "username", value)
486
+
487
+
488
+ @pulumi.type_token("vault:database/secretBackendStaticRole:SecretBackendStaticRole")
489
+ class SecretBackendStaticRole(pulumi.CustomResource):
490
+ @overload
491
+ def __init__(__self__,
492
+ resource_name: str,
493
+ opts: Optional[pulumi.ResourceOptions] = None,
494
+ backend: Optional[pulumi.Input[_builtins.str]] = None,
495
+ credential_config: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
496
+ credential_type: Optional[pulumi.Input[_builtins.str]] = None,
497
+ db_name: Optional[pulumi.Input[_builtins.str]] = None,
498
+ name: Optional[pulumi.Input[_builtins.str]] = None,
499
+ namespace: Optional[pulumi.Input[_builtins.str]] = None,
500
+ rotation_period: Optional[pulumi.Input[_builtins.int]] = None,
501
+ rotation_schedule: Optional[pulumi.Input[_builtins.str]] = None,
502
+ rotation_statements: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
503
+ rotation_window: Optional[pulumi.Input[_builtins.int]] = None,
504
+ self_managed_password: Optional[pulumi.Input[_builtins.str]] = None,
505
+ skip_import_rotation: Optional[pulumi.Input[_builtins.bool]] = None,
506
+ username: Optional[pulumi.Input[_builtins.str]] = None,
507
+ __props__=None):
508
+ """
509
+ Creates a Database Secret Backend static role in Vault. Database secret backend
510
+ static roles can be used to manage 1-to-1 mapping of a Vault Role to a user in a
511
+ database for the database.
512
+
513
+ ## Example Usage
514
+
515
+ ```python
516
+ import pulumi
517
+ import pulumi_vault as vault
518
+
519
+ db = vault.Mount("db",
520
+ path="postgres",
521
+ type="database")
522
+ postgres = vault.database.SecretBackendConnection("postgres",
523
+ backend=db.path,
524
+ name="postgres",
525
+ allowed_roles=["*"],
526
+ postgresql={
527
+ "connection_url": "postgres://username:password@host:port/database",
528
+ })
529
+ # configure a static role with period-based rotations
530
+ period_role = vault.database.SecretBackendStaticRole("period_role",
531
+ backend=db.path,
532
+ name="my-period-role",
533
+ db_name=postgres.name,
534
+ username="example",
535
+ rotation_period=3600,
536
+ rotation_statements=["ALTER USER \\"{{name}}\\" WITH PASSWORD '{{password}}';"])
537
+ # configure a static role with schedule-based rotations
538
+ schedule_role = vault.database.SecretBackendStaticRole("schedule_role",
539
+ backend=db.path,
540
+ name="my-schedule-role",
541
+ db_name=postgres.name,
542
+ username="example",
543
+ rotation_schedule="0 0 * * SAT",
544
+ rotation_window=172800,
545
+ rotation_statements=["ALTER USER \\"{{name}}\\" WITH PASSWORD '{{password}}';"])
546
+ ```
547
+
548
+ ## Import
549
+
550
+ Database secret backend static roles can be imported using the `backend`, `/static-roles/`, and the `name` e.g.
551
+
552
+ ```sh
553
+ $ pulumi import vault:database/secretBackendStaticRole:SecretBackendStaticRole example postgres/static-roles/my-role
554
+ ```
555
+
556
+ :param str resource_name: The name of the resource.
557
+ :param pulumi.ResourceOptions opts: Options for the resource.
558
+ :param pulumi.Input[_builtins.str] backend: The unique name of the Vault mount to configure.
559
+ :param pulumi.Input[_builtins.str] credential_type: The credential type for the user, can be one of "password", "rsa_private_key" or "client_certificate".The configuration can be done in `credential_config`.
560
+ :param pulumi.Input[_builtins.str] db_name: The unique name of the database connection to use for the static role.
561
+ :param pulumi.Input[_builtins.str] name: A unique name to give the static role.
562
+ :param pulumi.Input[_builtins.str] namespace: The namespace to provision the resource in.
563
+ The value should not contain leading or trailing forward slashes.
564
+ The `namespace` is always relative to the provider's configured namespace.
565
+ *Available only for Vault Enterprise*.
566
+ :param pulumi.Input[_builtins.int] rotation_period: The amount of time Vault should wait before rotating the password, in seconds.
567
+ Mutually exclusive with `rotation_schedule`.
568
+ :param pulumi.Input[_builtins.str] rotation_schedule: A cron-style string that will define the schedule on which rotations should occur.
569
+ Mutually exclusive with `rotation_period`.
570
+
571
+ **Warning**: The `rotation_period` and `rotation_schedule` fields are
572
+ mutually exclusive. One of them must be set but not both.
573
+ :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] rotation_statements: Database statements to execute to rotate the password for the configured database user.
574
+ :param pulumi.Input[_builtins.int] rotation_window: The amount of time, in seconds, in which rotations are allowed to occur starting
575
+ from a given `rotation_schedule`.
576
+ :param pulumi.Input[_builtins.str] self_managed_password: The password corresponding to the username in the database.
577
+ Required when using the Rootless Password Rotation workflow for static roles. Only enabled for
578
+ select DB engines (Postgres). Requires Vault 1.18+ Enterprise.
579
+ :param pulumi.Input[_builtins.bool] skip_import_rotation: If set to true, Vault will skip the
580
+ initial secret rotation on import. Requires Vault 1.18+ Enterprise.
581
+ :param pulumi.Input[_builtins.str] username: The database username that this static role corresponds to.
582
+ """
583
+ ...
584
+ @overload
585
+ def __init__(__self__,
586
+ resource_name: str,
587
+ args: SecretBackendStaticRoleArgs,
588
+ opts: Optional[pulumi.ResourceOptions] = None):
589
+ """
590
+ Creates a Database Secret Backend static role in Vault. Database secret backend
591
+ static roles can be used to manage 1-to-1 mapping of a Vault Role to a user in a
592
+ database for the database.
593
+
594
+ ## Example Usage
595
+
596
+ ```python
597
+ import pulumi
598
+ import pulumi_vault as vault
599
+
600
+ db = vault.Mount("db",
601
+ path="postgres",
602
+ type="database")
603
+ postgres = vault.database.SecretBackendConnection("postgres",
604
+ backend=db.path,
605
+ name="postgres",
606
+ allowed_roles=["*"],
607
+ postgresql={
608
+ "connection_url": "postgres://username:password@host:port/database",
609
+ })
610
+ # configure a static role with period-based rotations
611
+ period_role = vault.database.SecretBackendStaticRole("period_role",
612
+ backend=db.path,
613
+ name="my-period-role",
614
+ db_name=postgres.name,
615
+ username="example",
616
+ rotation_period=3600,
617
+ rotation_statements=["ALTER USER \\"{{name}}\\" WITH PASSWORD '{{password}}';"])
618
+ # configure a static role with schedule-based rotations
619
+ schedule_role = vault.database.SecretBackendStaticRole("schedule_role",
620
+ backend=db.path,
621
+ name="my-schedule-role",
622
+ db_name=postgres.name,
623
+ username="example",
624
+ rotation_schedule="0 0 * * SAT",
625
+ rotation_window=172800,
626
+ rotation_statements=["ALTER USER \\"{{name}}\\" WITH PASSWORD '{{password}}';"])
627
+ ```
628
+
629
+ ## Import
630
+
631
+ Database secret backend static roles can be imported using the `backend`, `/static-roles/`, and the `name` e.g.
632
+
633
+ ```sh
634
+ $ pulumi import vault:database/secretBackendStaticRole:SecretBackendStaticRole example postgres/static-roles/my-role
635
+ ```
636
+
637
+ :param str resource_name: The name of the resource.
638
+ :param SecretBackendStaticRoleArgs args: The arguments to use to populate this resource's properties.
639
+ :param pulumi.ResourceOptions opts: Options for the resource.
640
+ """
641
+ ...
642
+ def __init__(__self__, resource_name: str, *args, **kwargs):
643
+ resource_args, opts = _utilities.get_resource_args_opts(SecretBackendStaticRoleArgs, pulumi.ResourceOptions, *args, **kwargs)
644
+ if resource_args is not None:
645
+ __self__._internal_init(resource_name, opts, **resource_args.__dict__)
646
+ else:
647
+ __self__._internal_init(resource_name, *args, **kwargs)
648
+
649
+ def _internal_init(__self__,
650
+ resource_name: str,
651
+ opts: Optional[pulumi.ResourceOptions] = None,
652
+ backend: Optional[pulumi.Input[_builtins.str]] = None,
653
+ credential_config: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
654
+ credential_type: Optional[pulumi.Input[_builtins.str]] = None,
655
+ db_name: Optional[pulumi.Input[_builtins.str]] = None,
656
+ name: Optional[pulumi.Input[_builtins.str]] = None,
657
+ namespace: Optional[pulumi.Input[_builtins.str]] = None,
658
+ rotation_period: Optional[pulumi.Input[_builtins.int]] = None,
659
+ rotation_schedule: Optional[pulumi.Input[_builtins.str]] = None,
660
+ rotation_statements: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
661
+ rotation_window: Optional[pulumi.Input[_builtins.int]] = None,
662
+ self_managed_password: Optional[pulumi.Input[_builtins.str]] = None,
663
+ skip_import_rotation: Optional[pulumi.Input[_builtins.bool]] = None,
664
+ username: Optional[pulumi.Input[_builtins.str]] = None,
665
+ __props__=None):
666
+ opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
667
+ if not isinstance(opts, pulumi.ResourceOptions):
668
+ raise TypeError('Expected resource options to be a ResourceOptions instance')
669
+ if opts.id is None:
670
+ if __props__ is not None:
671
+ raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
672
+ __props__ = SecretBackendStaticRoleArgs.__new__(SecretBackendStaticRoleArgs)
673
+
674
+ if backend is None and not opts.urn:
675
+ raise TypeError("Missing required property 'backend'")
676
+ __props__.__dict__["backend"] = backend
677
+ __props__.__dict__["credential_config"] = credential_config
678
+ __props__.__dict__["credential_type"] = credential_type
679
+ if db_name is None and not opts.urn:
680
+ raise TypeError("Missing required property 'db_name'")
681
+ __props__.__dict__["db_name"] = db_name
682
+ __props__.__dict__["name"] = name
683
+ __props__.__dict__["namespace"] = namespace
684
+ __props__.__dict__["rotation_period"] = rotation_period
685
+ __props__.__dict__["rotation_schedule"] = rotation_schedule
686
+ __props__.__dict__["rotation_statements"] = rotation_statements
687
+ __props__.__dict__["rotation_window"] = rotation_window
688
+ __props__.__dict__["self_managed_password"] = None if self_managed_password is None else pulumi.Output.secret(self_managed_password)
689
+ __props__.__dict__["skip_import_rotation"] = skip_import_rotation
690
+ if username is None and not opts.urn:
691
+ raise TypeError("Missing required property 'username'")
692
+ __props__.__dict__["username"] = username
693
+ secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["selfManagedPassword"])
694
+ opts = pulumi.ResourceOptions.merge(opts, secret_opts)
695
+ super(SecretBackendStaticRole, __self__).__init__(
696
+ 'vault:database/secretBackendStaticRole:SecretBackendStaticRole',
697
+ resource_name,
698
+ __props__,
699
+ opts)
700
+
701
+ @staticmethod
702
+ def get(resource_name: str,
703
+ id: pulumi.Input[str],
704
+ opts: Optional[pulumi.ResourceOptions] = None,
705
+ backend: Optional[pulumi.Input[_builtins.str]] = None,
706
+ credential_config: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
707
+ credential_type: Optional[pulumi.Input[_builtins.str]] = None,
708
+ db_name: Optional[pulumi.Input[_builtins.str]] = None,
709
+ name: Optional[pulumi.Input[_builtins.str]] = None,
710
+ namespace: Optional[pulumi.Input[_builtins.str]] = None,
711
+ rotation_period: Optional[pulumi.Input[_builtins.int]] = None,
712
+ rotation_schedule: Optional[pulumi.Input[_builtins.str]] = None,
713
+ rotation_statements: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
714
+ rotation_window: Optional[pulumi.Input[_builtins.int]] = None,
715
+ self_managed_password: Optional[pulumi.Input[_builtins.str]] = None,
716
+ skip_import_rotation: Optional[pulumi.Input[_builtins.bool]] = None,
717
+ username: Optional[pulumi.Input[_builtins.str]] = None) -> 'SecretBackendStaticRole':
718
+ """
719
+ Get an existing SecretBackendStaticRole resource's state with the given name, id, and optional extra
720
+ properties used to qualify the lookup.
721
+
722
+ :param str resource_name: The unique name of the resulting resource.
723
+ :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
724
+ :param pulumi.ResourceOptions opts: Options for the resource.
725
+ :param pulumi.Input[_builtins.str] backend: The unique name of the Vault mount to configure.
726
+ :param pulumi.Input[_builtins.str] credential_type: The credential type for the user, can be one of "password", "rsa_private_key" or "client_certificate".The configuration can be done in `credential_config`.
727
+ :param pulumi.Input[_builtins.str] db_name: The unique name of the database connection to use for the static role.
728
+ :param pulumi.Input[_builtins.str] name: A unique name to give the static role.
729
+ :param pulumi.Input[_builtins.str] namespace: The namespace to provision the resource in.
730
+ The value should not contain leading or trailing forward slashes.
731
+ The `namespace` is always relative to the provider's configured namespace.
732
+ *Available only for Vault Enterprise*.
733
+ :param pulumi.Input[_builtins.int] rotation_period: The amount of time Vault should wait before rotating the password, in seconds.
734
+ Mutually exclusive with `rotation_schedule`.
735
+ :param pulumi.Input[_builtins.str] rotation_schedule: A cron-style string that will define the schedule on which rotations should occur.
736
+ Mutually exclusive with `rotation_period`.
737
+
738
+ **Warning**: The `rotation_period` and `rotation_schedule` fields are
739
+ mutually exclusive. One of them must be set but not both.
740
+ :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] rotation_statements: Database statements to execute to rotate the password for the configured database user.
741
+ :param pulumi.Input[_builtins.int] rotation_window: The amount of time, in seconds, in which rotations are allowed to occur starting
742
+ from a given `rotation_schedule`.
743
+ :param pulumi.Input[_builtins.str] self_managed_password: The password corresponding to the username in the database.
744
+ Required when using the Rootless Password Rotation workflow for static roles. Only enabled for
745
+ select DB engines (Postgres). Requires Vault 1.18+ Enterprise.
746
+ :param pulumi.Input[_builtins.bool] skip_import_rotation: If set to true, Vault will skip the
747
+ initial secret rotation on import. Requires Vault 1.18+ Enterprise.
748
+ :param pulumi.Input[_builtins.str] username: The database username that this static role corresponds to.
749
+ """
750
+ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
751
+
752
+ __props__ = _SecretBackendStaticRoleState.__new__(_SecretBackendStaticRoleState)
753
+
754
+ __props__.__dict__["backend"] = backend
755
+ __props__.__dict__["credential_config"] = credential_config
756
+ __props__.__dict__["credential_type"] = credential_type
757
+ __props__.__dict__["db_name"] = db_name
758
+ __props__.__dict__["name"] = name
759
+ __props__.__dict__["namespace"] = namespace
760
+ __props__.__dict__["rotation_period"] = rotation_period
761
+ __props__.__dict__["rotation_schedule"] = rotation_schedule
762
+ __props__.__dict__["rotation_statements"] = rotation_statements
763
+ __props__.__dict__["rotation_window"] = rotation_window
764
+ __props__.__dict__["self_managed_password"] = self_managed_password
765
+ __props__.__dict__["skip_import_rotation"] = skip_import_rotation
766
+ __props__.__dict__["username"] = username
767
+ return SecretBackendStaticRole(resource_name, opts=opts, __props__=__props__)
768
+
769
+ @_builtins.property
770
+ @pulumi.getter
771
+ def backend(self) -> pulumi.Output[_builtins.str]:
772
+ """
773
+ The unique name of the Vault mount to configure.
774
+ """
775
+ return pulumi.get(self, "backend")
776
+
777
+ @_builtins.property
778
+ @pulumi.getter(name="credentialConfig")
779
+ def credential_config(self) -> pulumi.Output[Optional[Mapping[str, _builtins.str]]]:
780
+ return pulumi.get(self, "credential_config")
781
+
782
+ @_builtins.property
783
+ @pulumi.getter(name="credentialType")
784
+ def credential_type(self) -> pulumi.Output[_builtins.str]:
785
+ """
786
+ The credential type for the user, can be one of "password", "rsa_private_key" or "client_certificate".The configuration can be done in `credential_config`.
787
+ """
788
+ return pulumi.get(self, "credential_type")
789
+
790
+ @_builtins.property
791
+ @pulumi.getter(name="dbName")
792
+ def db_name(self) -> pulumi.Output[_builtins.str]:
793
+ """
794
+ The unique name of the database connection to use for the static role.
795
+ """
796
+ return pulumi.get(self, "db_name")
797
+
798
+ @_builtins.property
799
+ @pulumi.getter
800
+ def name(self) -> pulumi.Output[_builtins.str]:
801
+ """
802
+ A unique name to give the static role.
803
+ """
804
+ return pulumi.get(self, "name")
805
+
806
+ @_builtins.property
807
+ @pulumi.getter
808
+ def namespace(self) -> pulumi.Output[Optional[_builtins.str]]:
809
+ """
810
+ The namespace to provision the resource in.
811
+ The value should not contain leading or trailing forward slashes.
812
+ The `namespace` is always relative to the provider's configured namespace.
813
+ *Available only for Vault Enterprise*.
814
+ """
815
+ return pulumi.get(self, "namespace")
816
+
817
+ @_builtins.property
818
+ @pulumi.getter(name="rotationPeriod")
819
+ def rotation_period(self) -> pulumi.Output[Optional[_builtins.int]]:
820
+ """
821
+ The amount of time Vault should wait before rotating the password, in seconds.
822
+ Mutually exclusive with `rotation_schedule`.
823
+ """
824
+ return pulumi.get(self, "rotation_period")
825
+
826
+ @_builtins.property
827
+ @pulumi.getter(name="rotationSchedule")
828
+ def rotation_schedule(self) -> pulumi.Output[Optional[_builtins.str]]:
829
+ """
830
+ A cron-style string that will define the schedule on which rotations should occur.
831
+ Mutually exclusive with `rotation_period`.
832
+
833
+ **Warning**: The `rotation_period` and `rotation_schedule` fields are
834
+ mutually exclusive. One of them must be set but not both.
835
+ """
836
+ return pulumi.get(self, "rotation_schedule")
837
+
838
+ @_builtins.property
839
+ @pulumi.getter(name="rotationStatements")
840
+ def rotation_statements(self) -> pulumi.Output[Optional[Sequence[_builtins.str]]]:
841
+ """
842
+ Database statements to execute to rotate the password for the configured database user.
843
+ """
844
+ return pulumi.get(self, "rotation_statements")
845
+
846
+ @_builtins.property
847
+ @pulumi.getter(name="rotationWindow")
848
+ def rotation_window(self) -> pulumi.Output[Optional[_builtins.int]]:
849
+ """
850
+ The amount of time, in seconds, in which rotations are allowed to occur starting
851
+ from a given `rotation_schedule`.
852
+ """
853
+ return pulumi.get(self, "rotation_window")
854
+
855
+ @_builtins.property
856
+ @pulumi.getter(name="selfManagedPassword")
857
+ def self_managed_password(self) -> pulumi.Output[Optional[_builtins.str]]:
858
+ """
859
+ The password corresponding to the username in the database.
860
+ Required when using the Rootless Password Rotation workflow for static roles. Only enabled for
861
+ select DB engines (Postgres). Requires Vault 1.18+ Enterprise.
862
+ """
863
+ return pulumi.get(self, "self_managed_password")
864
+
865
+ @_builtins.property
866
+ @pulumi.getter(name="skipImportRotation")
867
+ def skip_import_rotation(self) -> pulumi.Output[Optional[_builtins.bool]]:
868
+ """
869
+ If set to true, Vault will skip the
870
+ initial secret rotation on import. Requires Vault 1.18+ Enterprise.
871
+ """
872
+ return pulumi.get(self, "skip_import_rotation")
873
+
874
+ @_builtins.property
875
+ @pulumi.getter
876
+ def username(self) -> pulumi.Output[_builtins.str]:
877
+ """
878
+ The database username that this static role corresponds to.
879
+ """
880
+ return pulumi.get(self, "username")
881
+