terraform-provider-flux
terraform-provider-flux copied to clipboard
Update git password in terraform should update git password in kubernetes too
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.
- Uninstall flux from cluster (by remove
flux_bootstrap_git
resource). - Rotate
var.flux_gitlab_token
. - Install flux in cluster (by add
flux_bootstrap_git
resource).