From bf6521b3621080108082df73697f9abecef92d04 Mon Sep 17 00:00:00 2001 From: Alexandre Pires Date: Tue, 24 Sep 2024 21:51:14 +0200 Subject: [PATCH] Fixes #1: Added provider.tf and variables.tf for k8sapps --- terraform/k8sapps/provider.tf | 8 +++----- terraform/k8sapps/variables.tf | 20 -------------------- 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/terraform/k8sapps/provider.tf b/terraform/k8sapps/provider.tf index c2618aa..105ba8d 100644 --- a/terraform/k8sapps/provider.tf +++ b/terraform/k8sapps/provider.tf @@ -29,11 +29,9 @@ terraform { } provider "kubernetes" { - host = var.k8s_host - client_certificate = base64decode(var.k8s_client_certificate) - client_key = base64decode(var.k8s_client_key) - cluster_ca_certificate = base64decode(var.k8s_cluster_ca_certificate) - insecure = true + config_path = "~/.kube/config" + config_context = "k8s" + insecure = true } provider "scaleway" { diff --git a/terraform/k8sapps/variables.tf b/terraform/k8sapps/variables.tf index 427bd16..e5ee846 100644 --- a/terraform/k8sapps/variables.tf +++ b/terraform/k8sapps/variables.tf @@ -67,23 +67,3 @@ variable "m3uproxy_secret" { description = "M3UProxy HMAC secret" type = string } - -variable "k8s_host" { - description = "K8S host" - type = string -} - -variable "k8s_client_certificate" { - description = "K8S client certificate" - type = string -} - -variable "k8s_client_key" { - description = "K8S client key" - type = string -} - -variable "k8s_cluster_ca_certificate" { - description = "K8S cluster CA certificate" - type = string -}