locals { control_plane_nodes = 1 } # 58639934 resource "hcloud_primary_ip" "cthulhu_control_plane" { count = local.control_plane_nodes name = "control-plane-${count.index}" type = "ipv4" assignee_type = "server" assignee_id = hcloud_server.cthulhu_control_plane[count.index].id auto_delete = false delete_protection = true } resource "hcloud_server" "cthulhu_control_plane" { count = local.control_plane_nodes name = "control-plane-${count.index}" image = "rocky-9" server_type = "cax11" location = "fsn1" backups = true shutdown_before_deletion = true placement_group_id = hcloud_placement_group.cthulhu_control_plane.id # firewall_ids = [ # hcloud_firewall.cthulhu_nodes_public.id, # hcloud_firewall.cthulhu_nodes_private.id, # ] ssh_keys = [data.hcloud_ssh_key.vojtechmares.id] labels = { "k8s.node.role" = "master" "k8s.node.name" = "master-${count.index}" "k8s.cluster.name" = "cthulhu" } public_net { ipv4_enabled = true ipv6_enabled = false } network { network_id = hcloud_network.cthulhu.id ip = cidrhost(hcloud_network_subnet.control_plane.ip_range, count.index + 1) } } module "workers_v2" { source = "./modules/node-pool/v1" network_id = hcloud_network.cthulhu.id placement_group_id = hcloud_placement_group.cthulhu_workers.id ssh_key_ids = [data.hcloud_ssh_key.vojtechmares.id] size = 3 server_type = "cx32" image = "rocky-9" location = "fsn1" subnet_cidr = "172.16.11.0/24" cluster_name = "cthulhu" }