Terraform-provider-helm: Can't read in-cluster config

Created on 9 Dec 2020  ·  2Comments  ·  Source: hashicorp/terraform-provider-helm

Terraform, Provider, Kubernetes and Helm Versions

Terraform version: 0.14.0
Provider version: 1.3.2
Kubernetes version: v1.19.3
Helm version: v3.4.1

Affected Resource(s)

  • helm provider

Terraform Configuration Files

terraform {
  required_version = ">= 0.14"
  required_providers {
    kubernetes = {
      source = "kubernetes"
    }
    helm = {
      source  = "helm"
      version = "~> 1.3.2"
    }
  }
}
provider "kubernetes" {}

provider "helm" { }

Since this PR:
https://github.com/hashicorp/terraform-provider-helm/pull/378
The option to read kubernetes config from within the cluster is missing.
Use case:
I'm running terraform apply as part of a ci/cd pipeline running inside the kubernetes cluster,
That means, that terraform cmd is being run from a pod that has cluster-admin rights, and the service-account token is mounted.
I cannot specify the setting in_cluster that was once found on the provider definition.
What are my alternatives?
Thanks.

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
bug

All 2 comments

Thanks for opening this @Moshem123. The in-cluster config should get picked up if you set load_config_file to false and not supply any other config – did you try that?

Note that there are some changes coming to the provider block soon. I've made a note to document this use case more clearly.

Thanks, it works :)
I'll remove the option when the new provider version will be out thanks again !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stefanthorpe picture stefanthorpe  ·  14Comments

mstrzele picture mstrzele  ·  13Comments

shamsalmon picture shamsalmon  ·  34Comments

kim0 picture kim0  ·  12Comments

adaphi picture adaphi  ·  11Comments