mirror of
https://github.com/2martens/terraform.git
synced 2026-10-17 15:26:50 +02:00
change: Remove private network for load balancer
This commit is contained in:
@@ -162,5 +162,4 @@ module "test_swarm_cluster" {
|
|||||||
server_subnet_id = hcloud_network_subnet.k8s-network-subnet.id
|
server_subnet_id = hcloud_network_subnet.k8s-network-subnet.id
|
||||||
stage_name = local.test_cluster
|
stage_name = local.test_cluster
|
||||||
number_nodes = 3
|
number_nodes = 3
|
||||||
loadbalancer_ip = cidrhost(hcloud_network_subnet.k8s-network-subnet.ip_range, 1)
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,14 +15,6 @@ resource "hcloud_load_balancer" "docker" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "hcloud_load_balancer_network" "private" {
|
|
||||||
count = var.number_nodes > 1 ? 1 : 0
|
|
||||||
|
|
||||||
load_balancer_id = hcloud_load_balancer.docker[count.index].id
|
|
||||||
subnet_id = var.server_subnet_id
|
|
||||||
ip = var.loadbalancer_ip
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "hcloud_rdns" "ipv4_load_balancer" {
|
resource "hcloud_rdns" "ipv4_load_balancer" {
|
||||||
count = var.number_nodes > 1 ? 1 : 0
|
count = var.number_nodes > 1 ? 1 : 0
|
||||||
|
|
||||||
|
|||||||
@@ -53,12 +53,6 @@ variable "loadbalancer_type" {
|
|||||||
default = "lb11"
|
default = "lb11"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "loadbalancer_ip" {
|
|
||||||
description = "The private IP of the loadbalancer. Variable contains valid IP but must be overridden if more than one manager node is created."
|
|
||||||
type = string
|
|
||||||
default = "0.0.0.0"
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "private_node_ips" {
|
variable "private_node_ips" {
|
||||||
description = "One IP in the private network subnet for each Docker Swarm manager node created."
|
description = "One IP in the private network subnet for each Docker Swarm manager node created."
|
||||||
type = list(string)
|
type = list(string)
|
||||||
|
|||||||
Reference in New Issue
Block a user