Skip to content

Commit 6ae5be7

Browse files
authored
feat: extend default autorotate (#132) <br> Change the default auto_rotate value from 1 month to 12.
1 parent f4b690b commit 6ae5be7

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ No modules.
8787
| <a name="input_cert_labels"></a> [cert\_labels](#input\_cert\_labels) | Optional, Labels for the certificate to be created | `list(string)` | `[]` | no |
8888
| <a name="input_cert_name"></a> [cert\_name](#input\_cert\_name) | Name of the certificate to be created in Secrets Manager | `string` | n/a | yes |
8989
| <a name="input_cert_other_sans"></a> [cert\_other\_sans](#input\_cert\_other\_sans) | Optional, The custom Object Identifier (OID) or UTF8-string Subject Alternative Names (SANs) to define for the CA certificate. The alternative names must match the values that are specified in the 'allowed\_other\_sans' field in the associated certificate template | `list(string)` | `[]` | no |
90-
| <a name="input_cert_rotation"></a> [cert\_rotation](#input\_cert\_rotation) | Optional, Rotation policy for the certificate to be created | <pre>object({<br> auto_rotate = optional(bool)<br> interval = optional(number)<br> unit = optional(string)<br> })</pre> | <pre>{<br> "auto_rotate": true,<br> "interval": 1,<br> "unit": "month"<br>}</pre> | no |
90+
| <a name="input_cert_rotation"></a> [cert\_rotation](#input\_cert\_rotation) | Optional, Rotation policy for the certificate to be created | <pre>object({<br> auto_rotate = optional(bool)<br> interval = optional(number)<br> unit = optional(string)<br> })</pre> | <pre>{<br> "auto_rotate": true,<br> "interval": 12,<br> "unit": "month"<br>}</pre> | no |
9191
| <a name="input_cert_secrets_group_id"></a> [cert\_secrets\_group\_id](#input\_cert\_secrets\_group\_id) | Optional, Id of Secrets Manager secret group to store the certificate in | `string` | `"default"` | no |
9292
| <a name="input_cert_template"></a> [cert\_template](#input\_cert\_template) | Name of the certificate template to use | `string` | n/a | yes |
93-
| <a name="input_cert_ttl"></a> [cert\_ttl](#input\_cert\_ttl) | Optional, Time-to-live (TTL) to assign to a private certificate | `string` | `null` | no |
93+
| <a name="input_cert_ttl"></a> [cert\_ttl](#input\_cert\_ttl) | Optional, Time-to-live (TTL) to assign to a private certificate | `string` | `"364d"` | no |
9494
| <a name="input_cert_uri_sans"></a> [cert\_uri\_sans](#input\_cert\_uri\_sans) | Optional, URI Subject Alternative Names (SANs) to define for the CA certificate, in a comma-delimited list | `string` | `null` | no |
9595
| <a name="input_cert_version_custom_metadata"></a> [cert\_version\_custom\_metadata](#input\_cert\_version\_custom\_metadata) | Optional, Custom version metadata for the certificate to be created | `map(string)` | `{}` | no |
9696
| <a name="input_exclude_cn_from_sans"></a> [exclude\_cn\_from\_sans](#input\_exclude\_cn\_from\_sans) | Optional, Controls whether the common name is excluded from Subject Alternative Names (SANs). If set to true, the common name is not included in DNS or Email SANs if they apply | `bool` | `false` | no |

examples/default/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module "private_secret_engine" {
4242
intermediate_ca_name = var.intermediate_ca_name
4343
certificate_template_name = var.certificate_template_name
4444
root_ca_common_name = "terraform-modules.ibm.com"
45-
root_ca_max_ttl = "8760h"
45+
root_ca_max_ttl = "87600h"
4646
}
4747

4848
module "secrets_manager_private_certificate" {

variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ variable "cert_rotation" {
156156
description = "Optional, Rotation policy for the certificate to be created"
157157
default = {
158158
auto_rotate = true
159-
interval = 1
159+
interval = 12
160160
unit = "month"
161161
}
162162

@@ -196,7 +196,7 @@ variable "cert_uri_sans" {
196196
variable "cert_ttl" {
197197
type = string
198198
description = "Optional, Time-to-live (TTL) to assign to a private certificate"
199-
default = null
199+
default = "364d"
200200

201201
validation {
202202
condition = var.cert_ttl == null ? true : can(regex("^[0-9]+[s,m,h,d]{0,1}$", var.cert_ttl))

0 commit comments

Comments
 (0)