subnet dissociated fix

This commit is contained in:
Karim Naufal
2022-04-13 14:14:22 +02:00
parent 0f52a4e535
commit 2e75234b7c
6 changed files with 30 additions and 21 deletions

View File

@@ -25,7 +25,7 @@ resource "hcloud_network_subnet" "control_plane" {
# Here we start at the beginning of the subnets cird array
resource "hcloud_network_subnet" "agent" {
count = length(local.network_ipv4_subnets)
count = length(local.agent_nodepools)
network_id = hcloud_network.k3s.id
type = "cloud"
network_zone = var.network_region
@@ -84,7 +84,8 @@ resource "null_resource" "destroy_traefik_loadbalancer" {
depends_on = [
local_sensitive_file.kubeconfig,
null_resource.control_planes[0],
hcloud_network_subnet.subnet,
hcloud_network_subnet.control_plane,
hcloud_network_subnet.agent,
hcloud_placement_group.control_plane,
hcloud_placement_group.agent,
hcloud_network.k3s,