magnolia-sre / terraform-kubernetes-kubectl-cmd

Terraform kubectl-cmd
https://registry.terraform.io/modules/magnolia-sre/kubectl-cmd/kubernetes/latest
GNU General Public License v3.0
3 stars 2 forks source link

Pass kubeconfig path directly #1

Closed iosifnicolae2 closed 1 year ago

iosifnicolae2 commented 1 year ago

Hi.

It would awesome to add an input variable named kubeconfig_path.

Right now, I'm using this fork by passing the following variables:

  endpoint = yamldecode(file(var.kubeconfig_path))["clusters"][0]["cluster"]["server"]
  token = null
  ca-certificate = yamldecode(file(var.kubeconfig_path))["clusters"][0]["cluster"]["certificate-authority-data"]
  client-certificate = yamldecode(file(var.kubeconfig_path))["clusters"][0]["cluster"]["client-certificate-data"]
  client-key = yamldecode(file(var.kubeconfig_path))["users"][0]["user"]["client-key-data"]

It would be great to have all the 3 authentication methods in one terraform module.

Thank you!

iosifnicolae2 commented 1 year ago

cc @LuxChanLu

aseixas-mgnl commented 1 year ago

I've released this newer version with support for both, @iosifnicolae2 can you check that it works on your side ? (if not, feel free to tag me and add any console output). Thanks! https://github.com/magnolia-sre/terraform-kubernetes-kubectl-cmd/releases/tag/v1.2.1

aseixas-mgnl commented 1 year ago

Closed for inactivity