From 226d487ba8745e2644ddda270816bc769f93ae08 Mon Sep 17 00:00:00 2001 From: qdelamea Date: Mon, 6 May 2024 13:01:53 +0200 Subject: [PATCH] feat: optional generation of kubeconfig for GCP --- infrastructure/quick-deploy/gcp/gke.tf | 2 +- infrastructure/quick-deploy/gcp/variables.tf | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/infrastructure/quick-deploy/gcp/gke.tf b/infrastructure/quick-deploy/gcp/gke.tf index d8d258ef2..56a235fa9 100644 --- a/infrastructure/quick-deploy/gcp/gke.tf +++ b/infrastructure/quick-deploy/gcp/gke.tf @@ -6,7 +6,7 @@ module "gke" { subnetwork_cidr = module.vpc.gke_subnet_cidr_block ip_range_pods = module.vpc.gke_subnet_pods_range_name ip_range_services = module.vpc.gke_subnet_svc_range_name - kubeconfig_path = abspath(var.gke.kubeconfig_file) + kubeconfig_path = var.gke.generate_kubeconfig ? abspath(var.gke.kubeconfig_file) : null service_account_name = local.gke_name database_encryption = [ { diff --git a/infrastructure/quick-deploy/gcp/variables.tf b/infrastructure/quick-deploy/gcp/variables.tf index b70aa7c2c..62ac6484b 100644 --- a/infrastructure/quick-deploy/gcp/variables.tf +++ b/infrastructure/quick-deploy/gcp/variables.tf @@ -55,6 +55,7 @@ variable "gke" { services_cidr_block = optional(string, "172.17.17.0/24") }), {}) namespace = optional(string, "armonik") + generate_kubeconfig = optional(bool, true) kubeconfig_file = optional(string, "generated/kubeconfig") enable_public_gke_access = optional(bool, true) enable_gke_autopilot = optional(bool, false)