Skip to content

Remove cloudflare api token secret from cert-manager_cloudflare module - #154

Merged
steled merged 1 commit into
mainfrom
remove-cloudflare-secret
Nov 6, 2026
Merged

steled merged 1 commit into
mainfrom
remove-cloudflare-secret

Conversation

@steled

@steled steled commented Nov 6, 2026

Copy link
Copy Markdown
Owner

Problem

The module created the secret cert-manager/cloudflare-api-token, and ArgoCD (helm-cert-manager) deploys a SealedSecret with the same name. The sealed-secrets controller adopts the existing Secret and copies the argocd.argoproj.io/tracking-id annotation onto it. Terraform then showed a permanent diff on that annotation.

Change

  • Remove kubernetes_secret_v1.cloudflare_api_token_secret (secret.tf)
  • Remove variable cloudflare_api_token
  • Remove depends_on references to the secret

The secret is now managed solely by the SealedSecret in ArgoCD.

Migration

Callers must drop cloudflare_api_token from the module call and run
terraform state rm module.<name>.kubernetes_secret_v1.cloudflare_api_token_secret before applying, otherwise the secret gets destroyed.

Note: on a fresh cluster, certificates are only issued once ArgoCD has synced the SealedSecret (requires the sealed-secrets key to be restored).

🤖 Generated with Claude Code

The secret is managed by ArgoCD via a SealedSecret. Managing it in
Terraform as well caused a permanent diff on the argocd tracking-id
annotation set by the sealed-secrets controller.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: steled <34886888+steled@users.noreply.github.com>
@steled
steled merged commit 0ceacba into main Nov 6, 2026
3 checks passed
@steled
steled deleted the remove-cloudflare-secret branch November 6, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant