Difference between revisions of "Terraform provider: Helm"

From wikieduonline
Jump to navigation Jump to search
Line 1: Line 1:
 
https://registry.terraform.io/providers/hashicorp/helm/latest/docs
 
https://registry.terraform.io/providers/hashicorp/helm/latest/docs
  
 +
== Examples ==
 
  provider "helm" {}
 
  provider "helm" {}
  
Line 18: Line 19:
  
  
 
+
=== Official example in EKS module deployed with Karpenter ===
 
  https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/examples/karpenter/main.tf
 
  https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/examples/karpenter/main.tf
 
  {{provider helm karpenter example}}
 
  {{provider helm karpenter example}}

Revision as of 09:08, 30 January 2025

https://registry.terraform.io/providers/hashicorp/helm/latest/docs

Examples

provider "helm" {}
provider "helm" {
  kubernetes {
    config_path = "~/.kube/config"
  }
}
provider "helm" {
  kubernetes {
    config_path = "~/.kube/config"
    config_context = "my-context-cluster"
  }
}


Official example in EKS module deployed with Karpenter

https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/examples/karpenter/main.tf
 provider "helm" {
 kubernetes {
   host                   = module.eks.cluster_endpoint
   cluster_ca_certificate = base64decode(module.eks.cluster_certificate_authority_data)

   exec {
     api_version = "client.authentication.k8s.io/v1beta1"
     command     = "aws"
     # This requires the awscli to be installed locally where Terraform is executed
     args = ["eks", "get-token", "--cluster-name", module.eks.cluster_name]
   }
 }
}

Resources:

Data source:

Related

See also

Advertising: