Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions data/data/powervs/loadbalancer/alb.tf
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,31 @@ resource "ibm_is_lb_pool_member" "api_member" {
target_address = local.api_servers[count.index]
}

# bootstrap listener and backend pool
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how cleanup things works for the bootstrap but we need to ensure we clean these resources and remove 22 from the security group also post bootstrap completion.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch. i created a work item for this

resource "ibm_is_lb_listener" "bootstrap_listener" {
lb = ibm_is_lb.load_balancer.id
port = 22
protocol = "tcp"
default_pool = ibm_is_lb_pool.bootstrap_pool.id
}
resource "ibm_is_lb_pool" "bootstrap_pool" {
depends_on = [ibm_is_lb.load_balancer]

name = "bootstrap-node"
lb = ibm_is_lb.load_balancer.id
algorithm = "round_robin"
protocol = "tcp"
health_delay = 5
health_retries = 2
health_timeout = 2
health_type = "tcp"
}
resource "ibm_is_lb_pool_member" "bootstrap" {
depends_on = [ibm_is_lb_listener.bootstrap_listener]

lb = ibm_is_lb.load_balancer.id
pool = ibm_is_lb_pool.bootstrap_pool.id
port = 22
target_address = var.bootstrap_ip
}

2 changes: 1 addition & 1 deletion data/data/powervs/loadbalancer/sg.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
locals {
tcp_ports = [22623, 6443]
tcp_ports = [22623, 6443, 22]
}
data "ibm_is_vpc" "vpc" {
name = var.vpc_name
Expand Down