Skip to content

Commit baf64e6

Browse files
fix: wire time_rotating to auth proxy TLS cert for actual rotation
time_rotating.auth_proxy_cert_rotation was declared but never referenced by tls_private_key.auth_proxy or tls_self_signed_cert.auth_proxy. The cert had a 1-year validity but would never rotate automatically. Add replace_triggered_by to both resources so they regenerate every 30 days when the time_rotating resource triggers. Co-authored-by: Ona <no-reply@ona.com>
1 parent 549ee5f commit baf64e6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

runner-vm.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ resource "tls_private_key" "auth_proxy" {
3636
algorithm = "RSA"
3737
rsa_bits = 2048
3838

39-
# Force recreation when rotation time changes
4039
lifecycle {
4140
create_before_destroy = true
41+
replace_triggered_by = [time_rotating.auth_proxy_cert_rotation]
4242
}
4343
}
4444

@@ -52,9 +52,9 @@ resource "tls_self_signed_cert" "auth_proxy" {
5252

5353
validity_period_hours = 8760 # 1 year
5454

55-
# Force recreation when rotation time changes
5655
lifecycle {
5756
create_before_destroy = true
57+
replace_triggered_by = [time_rotating.auth_proxy_cert_rotation]
5858
}
5959

6060
allowed_uses = [

0 commit comments

Comments
 (0)