我向我的目标群体声明了我的负载均衡器。
resource "aws_lb" "test" {
load_balancer_type = "gateway"
name = "gwlb-test"
subnet_mapping {
subnet_id = aws_subnet.Security-Data-1A-subnet.id
}
}
resource "aws_lb_target_group" "test" {
name = "gwlb-test"
port = 6081
protocol = "GENEVE"
vpc_id = aws_vpc.subnet_vpc_secu.id
target_type = "instance"
health_check {
port = 80
protocol = "HTTP"
}
}
但是我找不到通过目标组添加我的两个服务器的代码。
我只想将我的实例添加到目标组。
非常感谢您的帮助