You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add service_credential secret type (#101)<br>Support has been added for creating Service credentials secrets in Secrets Manager.<br><br>Before you start working with them, you will need to create a service authorization between Secrets Manager and the target service, see the provided example for more info.<br><br>Variables and outputs related to auto_rotation have been renamed. This may impact existing users of "user_password" type secrets.<br><br>Variables:<br>secret_user_pass_auto_rotation -> secret_auto_rotation<br>secret_user_pass_auto_rotation_unit -> secret_auto_rotation_unit<br>secret_user_pass_auto_rotation_interval -> secret_auto_rotation_interval<br> <br>Outputs:<br>user_pass_rotation -> secret_auto_rotation<br>user_pass_auto_rotation_interval -> secret_rotation_interval<br>user_pass_next_rotation_date -> secret_next_rotation_date
The following attributes and parameters are supported for both secret types:
18
+
The following attributes and parameters are supported for all secret types:
18
19
19
20
-`secret_group_id`: When `null`, the `default` secret-group is used.
20
21
-`secret_name`: The name of the secret that is created.
21
22
-`secret_description`: The description of the secret.
23
+
-`secret_type` : The type of the secret.
24
+
-`secret_labels` : Any labels to attach to the secret.
25
+
26
+
The following attributes and paramters are supported when storing arbitrary secrets:
27
+
22
28
-`secret_payload_password`: The payload (for arbitrary secrets) or password (for username and password credentials) of the secret.
23
29
24
-
The following attributes and parameters are supported only when storing user credentials:
30
+
The following attributes and parameters are supported when storing user credentials:
25
31
32
+
-`secret_payload_password`: The payload (for arbitrary secrets) or password (for username and password credentials) of the secret.
26
33
-`secret_username`: The username of the secret that is created. Applicable only to the `username_password` secret type. When the parameter is `null`, an `arbitrary` secret is created.
27
-
-`secret_user_pass_auto_rotation`: Configures automatic rotation. Default is `true`.
28
-
-`secret_user_pass_auto_rotation_unit`: Specifies the unit type for the secret rotation. Accepted values are `day` or `month`. Default is `day`.
29
-
-`secret_user_pass_auto_rotation_interval`: Specifies the rotation interval for the rotation unit. Default is `90`.
34
+
-`secret_auto_rotation`: Configures automatic rotation. Default is `true`.
35
+
-`secret_auto_rotation_unit`: Specifies the unit type for the secret rotation. Accepted values are `day` or `month`. Default is `day`.
36
+
-`secret_auto_rotation_interval`: Specifies the rotation interval for the rotation unit. Default is `89`.
30
37
31
-
The following attributes and parameters are supported only when creating imported certificates:
38
+
The following attributes and parameters are supported when creating imported certificates:
32
39
33
-
-`imported_cert`: specify if imported certificate secret type will be created, defaults to `false`.
34
40
-`imported_cert_certificate`: The TLS certificate to be imported. Defaults to `null`.
35
41
-`imported_cert_private_key`: Optional private key for the TLS certificate to be imported. Defaults to `null`.
36
42
-`imported_cert_intermediate`: Optional intermediate certificate for the TLS certificate to be imported. Defaults to `null`.
37
43
44
+
The following attributes and parameters are supported when creating service credentials:
45
+
46
+
-`service_credentials_source_service_crn`: The CRN of the target service instance to create the service credentials.
47
+
-`service_credentials_source_service_role`: The service specific role to give the service credentials.
48
+
-`secret_auto_rotation`: Configures automatic rotation. Default is `true`.
49
+
-`secret_auto_rotation_unit`: Specifies the unit type for the secret rotation. Accepted values are `day` or `month`. Default is `day`.
50
+
-`secret_auto_rotation_interval`: Specifies the rotation interval for the rotation unit. Default is `89`.
51
+
38
52
<!-- Below content is automatically populated via pre-commit hook -->
39
53
<!-- BEGIN OVERVIEW HOOK -->
40
54
## Overview
@@ -53,14 +67,14 @@ The following attributes and parameters are supported only when creating importe
| <aname="input_imported_cert_intermediate"></a> [imported\_cert\_intermediate](#input\_imported\_cert\_intermediate)| (optional) The intermediate certificate for the TLS certificate to import. |`string`|`null`| no |
145
180
| <aname="input_imported_cert_private_key"></a> [imported\_cert\_private\_key](#input\_imported\_cert\_private\_key)| (optional) The private key for the TLS certificate to import. |`string`|`null`| no |
146
181
| <aname="input_region"></a> [region](#input\_region)| The region where the Secrets Manager instance is deployed. |`string`| n/a | yes |
182
+
| <aname="input_secret_auto_rotation"></a> [secret\_auto\_rotation](#input\_secret\_auto\_rotation)| Whether to configure automatic rotation. Applies only to the `username_password` and `service_credentials` secret types. |`bool`|`true`| no |
183
+
| <aname="input_secret_auto_rotation_interval"></a> [secret\_auto\_rotation\_interval](#input\_secret\_auto\_rotation\_interval)| Specifies the rotation interval for the rotation unit. |`number`|`89`| no |
184
+
| <aname="input_secret_auto_rotation_unit"></a> [secret\_auto\_rotation\_unit](#input\_secret\_auto\_rotation\_unit)| Specifies the unit of time for rotation of a username\_password secret. Acceptable values are `day` or `month`. |`string`|`"day"`| no |
147
185
| <aname="input_secret_description"></a> [secret\_description](#input\_secret\_description)| Description of the secret to create. |`string`| n/a | yes |
148
186
| <aname="input_secret_group_id"></a> [secret\_group\_id](#input\_secret\_group\_id)| The ID of the secret group for the secret. If `null`, the `default` secret group is used. |`string`|`"default"`| no |
149
187
| <aname="input_secret_labels"></a> [secret\_labels](#input\_secret\_labels)| Labels of the secret to create. Up to 30 labels can be created. Labels can be 2 - 30 characters, including spaces. Special characters that are not permitted include the angled brackets (<>), comma (,), colon (:), ampersand (&), and vertical pipe character (\|). |`list(string)`|`[]`| no |
150
188
| <aname="input_secret_name"></a> [secret\_name](#input\_secret\_name)| Name of the secret to create. |`string`| n/a | yes |
151
189
| <aname="input_secret_payload_password"></a> [secret\_payload\_password](#input\_secret\_payload\_password)| The payload (for arbitrary secrets) or password (for username and password credentials) of the secret. |`string`|`""`| no |
152
-
| <aname="input_secret_type"></a> [secret\_type](#input\_secret\_type)| Type of secret to create, must be one of: arbitrary, username\_password, imported\_cert |`string`| n/a | yes |
153
-
| <aname="input_secret_user_pass_auto_rotation"></a> [secret\_user\_pass\_auto\_rotation](#input\_secret\_user\_pass\_auto\_rotation)| Whether to configure automatic rotation. Applies only to the `username_password` secret type. |`bool`|`true`| no |
154
-
| <aname="input_secret_user_pass_auto_rotation_interval"></a> [secret\_user\_pass\_auto\_rotation\_interval](#input\_secret\_user\_pass\_auto\_rotation\_interval)| Specifies the rotation interval for the rotation unit. |`number`|`90`| no |
155
-
| <aname="input_secret_user_pass_auto_rotation_unit"></a> [secret\_user\_pass\_auto\_rotation\_unit](#input\_secret\_user\_pass\_auto\_rotation\_unit)| Specifies the unit of time for rotation of a username\_password secret. Acceptable values are `day` or `month`. |`string`|`"day"`| no |
190
+
| <aname="input_secret_type"></a> [secret\_type](#input\_secret\_type)| Type of secret to create, must be one of: arbitrary, username\_password, imported\_cert, service\_credentials |`string`| n/a | yes |
156
191
| <aname="input_secret_username"></a> [secret\_username](#input\_secret\_username)| Username of the secret to create. Applies only to `username_password` secret types. When `null`, an `arbitrary` secret is created. |`string`|`null`| no |
157
192
| <aname="input_secrets_manager_guid"></a> [secrets\_manager\_guid](#input\_secrets\_manager\_guid)| The instance ID of the Secrets Manager instance where the secret will be added. |`string`| n/a | yes |
193
+
| <aname="input_service_credentials_source_service_crn"></a> [service\_credentials\_source\_service\_crn](#input\_service\_credentials\_source\_service\_crn)| The CRN of the source service instance to create the service credential. |`string`|`null`| no |
194
+
| <aname="input_service_credentials_source_service_role"></a> [service\_credentials\_source\_service\_role](#input\_service\_credentials\_source\_service\_role)| The role to give the service credential in the source service. |`string`|`null`| no |
195
+
| <aname="input_service_credentials_ttl"></a> [service\_credentials\_ttl](#input\_service\_credentials\_ttl)| The time-to-live (TTL) to assign to generated service credentials (in seconds). |`number`|`"7776000"`| no |
158
196
| <aname="input_service_endpoints"></a> [service\_endpoints](#input\_service\_endpoints)| The service endpoint type to communicate with the provided secrets manager instance. Possible values are `public` or `private`|`string`|`"public"`| no |
159
197
160
198
### Outputs
@@ -163,9 +201,9 @@ No modules.
163
201
|------|-------------|
164
202
| <aname="output_secret_crn"></a> [secret\_crn](#output\_secret\_crn)| CRN of the created Secret |
165
203
| <aname="output_secret_id"></a> [secret\_id](#output\_secret\_id)| ID of the created Secret |
166
-
| <aname="output_user_pass_next_rotation_date"></a> [user\_pass\_next\_rotation\_date](#output\_user\_pass\_next\_rotation\_date)| Next rotation data for username\_password secret |
167
-
| <aname="output_user_pass_rotation"></a> [user\_pass\_rotation](#output\_user\_pass\_rotation)| Status of auto-rotation for username\_password secret |
168
-
| <aname="output_user_pass_rotation_interval"></a> [user\_pass\_rotation\_interval](#output\_user\_pass\_rotation\_interval)| Rotation frecuency for username\_password secret |
204
+
| <aname="output_secret_next_rotation_date"></a> [secret\_next\_rotation\_date](#output\_secret\_next\_rotation\_date)| Next rotation date for secret (if applicable)|
205
+
| <aname="output_secret_rotation"></a> [secret\_rotation](#output\_secret\_rotation)| Status of auto-rotation for secret |
206
+
| <aname="output_secret_rotation_interval"></a> [secret\_rotation\_interval](#output\_secret\_rotation\_interval)| Rotation frecuency for secret (if applicable)|
0 commit comments