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

`flux_bootstrap_git` does not update components

Open ppodevlabs opened this issue 8 months ago • 1 comments

Hi! we are using the flux_bootstrap_git resource to deploy flux into our clusters.

Description

We do have running flux into the cluster and i'm trying to update the flux components using terraform but it is not detecting any change.

Provider config

provider "flux" {
  kubernetes = {
    host                   = data.azurerm_kubernetes_cluster.k8s_cluster.kube_admin_config.0.host
    client_certificate     = base64decode(data.azurerm_kubernetes_cluster.k8s_cluster.kube_admin_config.0.client_certificate)
    client_key             = base64decode(data.azurerm_kubernetes_cluster.k8s_cluster.kube_admin_config.0.client_key)
    cluster_ca_certificate = base64decode(data.azurerm_kubernetes_cluster.k8s_cluster.kube_admin_config.0.cluster_ca_certificate)
  }
  git = {
    url              = var.k8s_apps_flux_git_repository_ssh_url
    branch           = var.k8s_apps_flux_git_branch
    ssh = {
      username    = "git"
      private_key = data.secretsmanager_field.k8s_admin_sa_private_key.value
    }
  }
}

flux_bootstrap_git resource

resource "flux_bootstrap_git" "cluster_manager" {
  path             = "clusters/${var.cluster_name}"
  components       = toset(var.components)
  components_extra = toset(var.components_extra)
  version          = var.flux_version
}

Updating the variable flux_version does not trigger a change.

Expected behavior

changing the version should update the components and CRDs

ppodevlabs avatar Oct 24 '23 11:10 ppodevlabs