terraform-provider-flux icon indicating copy to clipboard operation
terraform-provider-flux copied to clipboard

fluxcd_bootstrap_git does not re-create flux-system secret

Open ketbla opened this issue 8 months ago • 2 comments

We've been using fluxcd and it works great, however now we're trying to rotate secrets and that seems to be broken with terraform.

According to the guide https://fluxcd.io/flux/installation/configuration/deploy-key-rotation/ we are supposed to:

  1. Delete secret in flux-system
  2. Re-run fluxcd bootstrap to re-create it

However when using terraform resource fluxcd_bootstrap_git, it does not detect that the secret was deleted and does not re-create it.

Steps to reproduce:

  1. run `kubectl delete secret flux-system -n flux-system
  2. Re-run terraform
  3. No changes, infrastructure up to date

Because of this, it makes it impossible to rotate keys for people using terraform to bootstrap fluxcd.

ketbla avatar Oct 23 '23 13:10 ketbla