I find that terraform-provider-flux doesn't check the validity of kubernetes credential on every terraform plan/terraform apply. So invalid kubernetes credentials could stay undetected in terraform-provider-flux for a long time and breaking in a fresh bootstrap.
Steps to reproduce
Bootstrap a testing cluster with the following provider configuration
Describe the bug
I find that terraform-provider-flux doesn't check the validity of kubernetes credential on every
terraform plan
/terraform apply
. So invalid kubernetes credentials could stay undetected in terraform-provider-flux for a long time and breaking in a fresh bootstrap.Steps to reproduce
Bootstrap a testing cluster with the following provider configuration
Refactor the kubernetes credential configuration:
Or the following example based on a real refactor regression:
terraform plan
orterraform apply
won't detect the kubernetes credential handling is problematic.Expected behavior
validate kubernetes credential on every plan/apply phase
Screenshots and recordings
No response
Terraform and provider versions
OpenTofu v1.6.2 on linux_amd64
Terraform provider configurations
provider "flux" { kubernetes = { config_path = "~/.kube/non_existed_config" } git = {} }
flux_bootstrap_git resource
resource "flux_bootstrap_git" "fleet" { cluster_domain = var.cluster_domain path = var.watch_path }
Flux version
null
Additional context
No response
Code of Conduct
Would you like to implement a fix?
None