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

Update git password in terraform should update git password in kubernetes too

Open pschirch opened this issue 5 months ago • 0 comments

Hey,

we auto rotate our git password in flux provider config.

provider "flux" {
  ...
  git = {
    ...
    http = {
      username = "token"
      password = var.flux_gitlab_token
    }
  }
}

Terraform performs the autorotate as expected, but the flux provider does not recognize that change of var.flux_gitlab_token. Cause this, flux could not interact with the corresponding git infrastructure repository.

The flux provider should recognize that change of var.flux_gitlab_token and keep it up to date in the cluster by upgrading the necessary secret.

Currently we use the following workaround.

  1. Uninstall flux from cluster (by remove flux_bootstrap_git resource).
  2. Rotate var.flux_gitlab_token.
  3. Install flux in cluster (by add flux_bootstrap_git resource).

pschirch avatar Feb 02 '24 13:02 pschirch