From 2e76904e8bba94040e58d9737ee3f62f8cdb24d4 Mon Sep 17 00:00:00 2001 From: miampf Date: Thu, 2 Jan 2025 10:44:18 +0100 Subject: [PATCH] add emergency_ssh var to other providers (untested) --- terraform/infrastructure/aws/main.tf | 1 + terraform/infrastructure/aws/variables.tf | 6 ++++++ terraform/infrastructure/gcp/main.tf | 1 + terraform/infrastructure/gcp/variables.tf | 6 ++++++ terraform/infrastructure/openstack/main.tf | 1 + terraform/infrastructure/openstack/variables.tf | 6 ++++++ 6 files changed, 21 insertions(+) diff --git a/terraform/infrastructure/aws/main.tf b/terraform/infrastructure/aws/main.tf index 3d9049ef9..8d09ad714 100644 --- a/terraform/infrastructure/aws/main.tf +++ b/terraform/infrastructure/aws/main.tf @@ -29,6 +29,7 @@ locals { { name = "recovery", port = "9999", health_check = "TCP" }, { name = "join", port = "30090", health_check = "TCP" }, var.debug ? [{ name = "debugd", port = "4000", health_check = "TCP" }] : [], + var.emergency_ssh ? [{ name = "ssh", port = "22", health_check = "TCP" }] : [], ]) target_group_arns = { control-plane : [ diff --git a/terraform/infrastructure/aws/variables.tf b/terraform/infrastructure/aws/variables.tf index 67d0ec4d3..f9966a8b8 100644 --- a/terraform/infrastructure/aws/variables.tf +++ b/terraform/infrastructure/aws/variables.tf @@ -85,3 +85,9 @@ variable "additional_tags" { default = {} description = "Additional tags that should be applied to created resources." } + +variable "emergency_ssh" { + type = bool + default = false + description = "Wether to deploy a load balancer to connect to nodes via ssh." +} diff --git a/terraform/infrastructure/gcp/main.tf b/terraform/infrastructure/gcp/main.tf index 19275bb06..017a4f428 100644 --- a/terraform/infrastructure/gcp/main.tf +++ b/terraform/infrastructure/gcp/main.tf @@ -40,6 +40,7 @@ locals { { name = "recovery", port = "9999", health_check = "TCP" }, { name = "join", port = "30090", health_check = "TCP" }, var.debug ? [{ name = "debugd", port = "4000", health_check = "TCP" }] : [], + var.emergency_ssh ? [{ name = "ssh", port = "22", health_check = "TCP" }] : [], ]) node_groups_by_role = { for name, node_group in var.node_groups : node_group.role => name... diff --git a/terraform/infrastructure/gcp/variables.tf b/terraform/infrastructure/gcp/variables.tf index 601394a55..dd328485c 100644 --- a/terraform/infrastructure/gcp/variables.tf +++ b/terraform/infrastructure/gcp/variables.tf @@ -75,3 +75,9 @@ variable "additional_labels" { default = {} description = "Additional labels that should be given to created recources." } + +variable "emergency_ssh" { + type = bool + default = false + description = "Wether to deploy a load balancer to connect to nodes via ssh." +} diff --git a/terraform/infrastructure/openstack/main.tf b/terraform/infrastructure/openstack/main.tf index 1ccbe1542..5bc88a139 100644 --- a/terraform/infrastructure/openstack/main.tf +++ b/terraform/infrastructure/openstack/main.tf @@ -43,6 +43,7 @@ locals { { name = "recovery", port = "9999", health_check = "TCP" }, { name = "join", port = "30090", health_check = "TCP" }, var.debug ? [{ name = "debugd", port = "4000", health_check = "TCP" }] : [], + var.emergency_ssh ? [{ name = "ssh", port = "22", health_check = "TCP" }] : [], ]) cidr_vpc_subnet_nodes = "192.168.178.0/24" cidr_vpc_subnet_lbs = "192.168.177.0/24" diff --git a/terraform/infrastructure/openstack/variables.tf b/terraform/infrastructure/openstack/variables.tf index 12242f08b..b7f639bd5 100644 --- a/terraform/infrastructure/openstack/variables.tf +++ b/terraform/infrastructure/openstack/variables.tf @@ -71,3 +71,9 @@ variable "stackit_project_id" { type = string description = "STACKIT project ID." } + +variable "emergency_ssh" { + type = bool + default = false + description = "Wether to deploy a load balancer to connect to nodes via ssh." +}