hashicorp / terraform-provider-helm

Terraform Helm provider
https://www.terraform.io/docs/providers/helm/
Mozilla Public License 2.0
997 stars 368 forks source link

unexpected error when reading response body on terraform apply #1350

Open amansharif opened 5 months ago

amansharif commented 5 months ago

Terraform, Provider, Kubernetes and Helm Versions

Terraform version: v1.7.5
Provider version: v2.13.0
Kubernetes version: v1.27.2

Affected Resource(s)

Terraform Configuration Files

resource "helm_release" "victoria_metrics_cluster" {
  name       = "vm-cluster"
  chart      = "victoria-metrics-cluster"
  repository = "https://artifactory.build.dlt/artifactory/helm"
  values     = [
    templatefile("files/values.yaml", {

    })
  ]
  namespace        = "vm-ops"
  create_namespace = true
  version          = "0.11.14"
  timeout          = 600
}

module "cluster" {
  source = "../../globals"
}

module "globals" {
  source = "../../../../globals"
}

provider "helm" {
  kubernetes {
    config_context = module.cluster.context
  }
}

provider "kubernetes" {
  config_context = module.cluster.context
}

Debug Output

https://gist.github.com/amansharif/9f9ab53078b69600097042a798f0a29d

NOTE: In addition to Terraform debugging, please set HELM_DEBUG=1 to enable debugging info from helm.

Panic Output

Steps to Reproduce

  1. terraform apply

Expected Behavior

It should have been applied successfully.

Actual Behavior

terraform apply failed during helm modification.

I have tried to execute terraform apply from WSL, Powershell, CMD even from docker container but encountered the same error. I have also tried different internet provider as well and it seems nothing to do with ISP. Additionally, I'm able to execute kubectl command as well as helm commands meaning it's the terraform helm provider which is causing problem.

Important Factoids

I'm running on Open source Kubernetes and the servers are hosted in OVH Cloud.

shuliakovsky commented 5 months ago

Had you try to apply chart with regular helm? This error looks like one of the k8s network wrong configuration error: