From 1505989b538097f44ecab5d174a49cdbf04c1a7e Mon Sep 17 00:00:00 2001 From: Florian Nowarre Date: Sun, 18 Sep 2022 21:16:18 +0200 Subject: [PATCH] change readme and var loads --- contrib/terraform/hetzner/README.md | 2 +- contrib/terraform/hetzner/main.tf | 1 + .../hetzner/modules/kubernetes-cluster-flatcar/main.tf | 2 +- .../hetzner/modules/kubernetes-cluster-flatcar/variables.tf | 2 -- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/contrib/terraform/hetzner/README.md b/contrib/terraform/hetzner/README.md index fdc43f9ff..aedbdb34a 100644 --- a/contrib/terraform/hetzner/README.md +++ b/contrib/terraform/hetzner/README.md @@ -59,7 +59,7 @@ Edit `default.tfvars` to match your requirement. Run Terraform to create the infrastructure. ```bash -terraform init ../../contrib/terraform/hetzner +terraform -chdir=../../contrib/terraform/hetzner init terraform apply --var-file default.tfvars ../../contrib/terraform/hetzner/ ``` diff --git a/contrib/terraform/hetzner/main.tf b/contrib/terraform/hetzner/main.tf index 32b3cc146..0502ed468 100644 --- a/contrib/terraform/hetzner/main.tf +++ b/contrib/terraform/hetzner/main.tf @@ -9,6 +9,7 @@ module "kubernetes" { machines = var.machines + ssh_public_keys = var.ssh_private_key_path ssh_public_keys = var.ssh_public_keys network_zone = var.network_zone diff --git a/contrib/terraform/hetzner/modules/kubernetes-cluster-flatcar/main.tf b/contrib/terraform/hetzner/modules/kubernetes-cluster-flatcar/main.tf index 64787374e..d416dc44c 100644 --- a/contrib/terraform/hetzner/modules/kubernetes-cluster-flatcar/main.tf +++ b/contrib/terraform/hetzner/modules/kubernetes-cluster-flatcar/main.tf @@ -143,7 +143,7 @@ data "template_file" "machine-configs" { name => machine } #template = file("${path.module}/machine-${each.key}.yaml.tmpl") - template = file("${path.module}/machine.yaml.tmpl") + template = file("${path.module}/template/machine.yaml.tmpl") vars = { ssh_keys = jsonencode(var.ssh_public_keys) diff --git a/contrib/terraform/hetzner/modules/kubernetes-cluster-flatcar/variables.tf b/contrib/terraform/hetzner/modules/kubernetes-cluster-flatcar/variables.tf index fcd696f86..26a6daa9c 100644 --- a/contrib/terraform/hetzner/modules/kubernetes-cluster-flatcar/variables.tf +++ b/contrib/terraform/hetzner/modules/kubernetes-cluster-flatcar/variables.tf @@ -1,7 +1,5 @@ variable "ssh_private_key_path" {} -variable "hcloud_token" {} -########################### variable "zone" { type = string default = "fsn1"