We have recently started using the terraform provider instead of the cli.
We use a branching strategy when updating our flux repo. We branch off main, make our changes, re-bootstrap the cluster off the new branch and test the changes.
When using flux cli, both the flux-system Gitrepository resource and the yaml in the git repository is updated to the new target branch.
Using the terraform provider, terraform recognizes the need to update, the yaml in the git repository is updated however the flux-system Gitrepository resource on the cluster is not.
When cluster is bootstrapped against main, var.git_branch=main
When cluster is re-bootstrapped to branch, var.git_branch=feat/updatexyz - the flux-system gotk-sync.yaml in git in the new branch is updated however flux-system Gitrepository resource remains on main.
Expected behavior
flux_bootstrap_git should update the cluster flux-system Gitrepository to use new branch in the same way flux cli does.
Describe the bug
We have recently started using the terraform provider instead of the cli.
We use a branching strategy when updating our flux repo. We branch off main, make our changes, re-bootstrap the cluster off the new branch and test the changes.
When using flux cli, both the flux-system Gitrepository resource and the yaml in the git repository is updated to the new target branch.
Using the terraform provider, terraform recognizes the need to update, the yaml in the git repository is updated however the flux-system Gitrepository resource on the cluster is not.
Steps to reproduce
var.git_branch=main
var.git_branch=feat/updatexyz
- the flux-system gotk-sync.yaml in git in the new branch is updated however flux-system Gitrepository resource remains onmain
.Expected behavior
flux_bootstrap_git
should update the cluster flux-system Gitrepository to use new branch in the same way flux cli does.Screenshots and recordings
No response
Terraform and provider versions
Terraform v1.7.3 fluxcd/flux Provider v1.2.3
Terraform provider configurations
terraform { required_providers { flux = { source = "fluxcd/flux" version = "1.2.3" } } }
flux_bootstrap_git resource
resource "flux_bootstrap_git" "this" { path = var.cluster_path
manifests_path = "${path.cwd}/manifests" registry = var.registry version = "v2.2.3" }
Flux version
v2.2.3
Additional context
No response
Code of Conduct
Would you like to implement a fix?
None