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

helm_release resource ignores provider with alias

Open oto-macenauer-absa opened this issue 1 year ago • 2 comments

Terraform, Provider, Kubernetes and Helm Versions

Terraform version: 1.5.1
Provider version: 2.10.1
Kubernetes version: 1.25

Affected Resource(s)

  • helm_release

Terraform Configuration Files

provider "helm" {
  alias = "sdc"

  kubernetes {
    config_path = "~/.kube/config"
    config_context = "colima"
  }
}

resource "helm_release" "aaa" {
  name       = "aaa"
  
  provider = helm.sdc

  chart = "dummy"

  values = [
  ]
}

Steps to Reproduce

  1. terraform apply

Expected Behavior

Terraform connects to Kubernetes

Actual Behavior

Error: Kubernetes cluster unreachable: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable

If I set a default helm provider the resource will use this.

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

oto-macenauer-absa avatar Jun 29 '23 09:06 oto-macenauer-absa

Hi @oto-macenauer-absa I've just tried your snippet and wasn't able to reproduce the issue with the same Terraform and helm provider version as you. Can you run your config with TF_LOG=DEBUG and post the output?

jrhouston avatar Jul 05 '23 03:07 jrhouston

I have same issue. If helm provider and helm_release resource are used with no aliases - it works.

If I set alias for provider and then pass it to resource - auth fails for me.

Terraform 1.7.5 Helm resource 2.13.2

varnav avatar May 30 '24 18:05 varnav