fix: wire time_rotating to auth proxy TLS cert for actual rotation (N10)#25
Merged
Conversation
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>
cezarelnazli
approved these changes
May 7, 2026
easyCZ
pushed a commit
that referenced
this pull request
May 21, 2026
fix: wire time_rotating to auth proxy TLS cert for actual rotation (N10)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
time_rotating.auth_proxy_cert_rotationis declared with a 30-day rotation period but is never referenced bytls_private_key.auth_proxyortls_self_signed_cert.auth_proxy. The cert has a 1-year validity period and never actually rotates — thetime_rotatingresource is dead code.Fix
Add
replace_triggered_by = [time_rotating.auth_proxy_cert_rotation]to bothtls_private_key.auth_proxyandtls_self_signed_cert.auth_proxylifecycle blocks. This causes both resources to be recreated every 30 days when the rotation trigger fires.Impact
On next
terraform applyafter the 30-day window expires, the TLS key and cert will be regenerated and the runner instance template will be updated (since the cloud-init user-data embeds the cert/key). The MIG rolling update will pick up the new template.Audit reference
Customer security audit item N10.