Difference between revisions of "Terraform: Helm provider"

From wikieduonline
Jump to navigation Jump to search
Line 7: Line 7:
 
     config_path = "[[~/.kube/config]]"
 
     config_path = "[[~/.kube/config]]"
 
   }
 
   }
 +
}
 +
 +
 +
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]
 +
    }
 +
  }
 
  }
 
  }
  

Revision as of 07:28, 7 February 2024

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

provider "helm" {}
provider "helm" {
  kubernetes {
    config_path = "~/.kube/config"
  }
}


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: