Skip to content

Commit 3037059

Browse files
committed
Fix certificate rotation
1 parent da9331a commit 3037059

File tree

1 file changed

+5
-1
lines changed
  • modules/cloudflare/certificate

1 file changed

+5
-1
lines changed

modules/cloudflare/certificate/main.tf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,18 @@ resource "time_rotating" "rotation" {
3030
rotation_days = 365 - 90 # requested_validity - 90 days for rotation
3131
}
3232

33+
resource "time_static" "rotation" {
34+
rfc3339 = time_rotating.rotation.rfc3339
35+
}
36+
3337
resource "cloudflare_origin_ca_certificate" "this" {
3438
csr = tls_cert_request.this.cert_request_pem
3539
hostnames = [ var.hostname ]
3640
request_type = "origin-rsa"
3741
requested_validity = 365
3842

3943
lifecycle {
40-
replace_triggered_by = [time_rotating.rotation.id]
44+
replace_triggered_by = [time_static.rotation]
4145
}
4246
}
4347

0 commit comments

Comments
 (0)