From f8b1b1d3d0929ea0a53b73ebf33e302515942cb0 Mon Sep 17 00:00:00 2001 From: Florian Nowarre Date: Sun, 18 Sep 2022 21:37:44 +0200 Subject: [PATCH] add ssh stuff --- contrib/terraform/hetzner/default.tfvars | 2 ++ contrib/terraform/hetzner/main.tf | 2 +- contrib/terraform/hetzner/variables.tf | 5 +++++ contrib/terraform/hetzner/versions.tf | 6 +++--- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/contrib/terraform/hetzner/default.tfvars b/contrib/terraform/hetzner/default.tfvars index 957b2d523..db9daa47b 100644 --- a/contrib/terraform/hetzner/default.tfvars +++ b/contrib/terraform/hetzner/default.tfvars @@ -9,6 +9,8 @@ ssh_public_keys = [ "ssh-rsa I-did-not-read-the-docs 2", ] +ssh_private_key_path = "flo_hcloud" + machines = { "master-0" : { "node_type" : "master", diff --git a/contrib/terraform/hetzner/main.tf b/contrib/terraform/hetzner/main.tf index 0502ed468..6fb3ccf71 100644 --- a/contrib/terraform/hetzner/main.tf +++ b/contrib/terraform/hetzner/main.tf @@ -9,7 +9,7 @@ module "kubernetes" { machines = var.machines - ssh_public_keys = var.ssh_private_key_path + ssh_private_key_path = var.ssh_private_key_path ssh_public_keys = var.ssh_public_keys network_zone = var.network_zone diff --git a/contrib/terraform/hetzner/variables.tf b/contrib/terraform/hetzner/variables.tf index e83676ad8..0404b5508 100644 --- a/contrib/terraform/hetzner/variables.tf +++ b/contrib/terraform/hetzner/variables.tf @@ -25,6 +25,11 @@ variable "ssh_public_keys" { type = list(string) } +variable "ssh_private_key_path" { + description = "Private SSH key which connect to the VMs." + type = string +} + variable "ssh_whitelist" { description = "List of IP ranges (CIDR) to whitelist for ssh" type = list(string) diff --git a/contrib/terraform/hetzner/versions.tf b/contrib/terraform/hetzner/versions.tf index 02e5b74ee..0c1889428 100644 --- a/contrib/terraform/hetzner/versions.tf +++ b/contrib/terraform/hetzner/versions.tf @@ -7,9 +7,9 @@ terraform { null = { source = "hashicorp/null" } - template = { - source = "hashicorp/template" - } + #template = { + # source = "hashicorp/template" + #} } required_version = ">= 0.14" }