From bb5ab6bd9a7e8ce68a47b45ccf0d4213b06784c6 Mon Sep 17 00:00:00 2001 From: jodhi Date: Thu, 24 Feb 2022 23:19:31 +0700 Subject: [PATCH] make sure control-plane ip dynamic --- servers.tf | 1 - terraform.tfvars.example | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/servers.tf b/servers.tf index a10c7d7..acfc3f2 100644 --- a/servers.tf +++ b/servers.tf @@ -12,7 +12,6 @@ module "control_planes" { placement_group_id = hcloud_placement_group.k3s.id location = var.location network_id = hcloud_network.k3s.id - ip = cidrhost(hcloud_network_subnet.k3s.ip_range, 257 + count.index) server_type = var.control_plane_server_type labels = { diff --git a/terraform.tfvars.example b/terraform.tfvars.example index 57a85f5..93945b2 100644 --- a/terraform.tfvars.example +++ b/terraform.tfvars.example @@ -16,16 +16,16 @@ lb_server_type = "lb11" servers_num = 3 # For agent nodes, at least 2 is recommended for HA, but you can keep automatic upgrades. +agents_num = 2 + agent_nodepools = { big = { server_type = "cpx31", - count = 3 + count = 1 + } + small = { + server_type = "cpx21", } - # Will fail because of the ip address collision (we use index number) - # small = { - # server_type = "cpx31", - # count = 3 - # } } # If you want to use a specific Hetzner CCM and CSI version, set them below, otherwise leave as is for the latest versions