change readme and var loads

This commit is contained in:
Florian Nowarre 2022-09-18 21:16:18 +02:00
parent 1736f02460
commit 1505989b53
4 changed files with 3 additions and 4 deletions

View file

@ -59,7 +59,7 @@ Edit `default.tfvars` to match your requirement.
Run Terraform to create the infrastructure. Run Terraform to create the infrastructure.
```bash ```bash
terraform init ../../contrib/terraform/hetzner terraform -chdir=../../contrib/terraform/hetzner init
terraform apply --var-file default.tfvars ../../contrib/terraform/hetzner/ terraform apply --var-file default.tfvars ../../contrib/terraform/hetzner/
``` ```

View file

@ -9,6 +9,7 @@ module "kubernetes" {
machines = var.machines machines = var.machines
ssh_public_keys = var.ssh_private_key_path
ssh_public_keys = var.ssh_public_keys ssh_public_keys = var.ssh_public_keys
network_zone = var.network_zone network_zone = var.network_zone

View file

@ -143,7 +143,7 @@ data "template_file" "machine-configs" {
name => machine name => machine
} }
#template = file("${path.module}/machine-${each.key}.yaml.tmpl") #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 = { vars = {
ssh_keys = jsonencode(var.ssh_public_keys) ssh_keys = jsonencode(var.ssh_public_keys)

View file

@ -1,7 +1,5 @@
variable "ssh_private_key_path" {} variable "ssh_private_key_path" {}
variable "hcloud_token" {}
###########################
variable "zone" { variable "zone" {
type = string type = string
default = "fsn1" default = "fsn1"