automated the creation of the subnets

This commit is contained in:
Karim Naufal
2022-03-09 02:07:24 +01:00
parent 56fc95763a
commit a72facdd1a
6 changed files with 15 additions and 42 deletions

View File

@@ -11,11 +11,11 @@ module "control_planes" {
placement_group_id = hcloud_placement_group.k3s.id
location = var.location
server_type = var.control_plane_server_type
ipv4_subnet_id = hcloud_network_subnet.subnet["control_plane"].id
ipv4_subnet_id = hcloud_network_subnet.subnet[1].id
# We leave some room so 100 eventual Hetzner LBs that can be created perfectly safely
# It leaves the subnet with 254 x 254 - 100 = 64416 IPs to use, so probably enough.
private_ipv4 = cidrhost(var.network_ipv4_subnets["control_plane"], count.index + 101)
private_ipv4 = cidrhost(local.network_ipv4_subnets[1], count.index + 101)
labels = {
"provisioner" = "terraform",