spot test 완료 및 자동화 스크립트
This commit is contained in:
69
spot_221207/terraform/04_nlb_target_group.tf
Normal file
69
spot_221207/terraform/04_nlb_target_group.tf
Normal file
@@ -0,0 +1,69 @@
|
||||
resource "aws_alb_target_group" "tg-spot-kr-tcp-30000" {
|
||||
name = "tg-spot-kr-tcp-30000"
|
||||
port = 30000
|
||||
protocol = "TCP"
|
||||
vpc_id = "${var.VPC_ID}"
|
||||
|
||||
health_check {
|
||||
interval = 30
|
||||
protocol = "TCP"
|
||||
healthy_threshold = 3
|
||||
unhealthy_threshold = 3
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
resource "aws_alb_target_group_attachment" "spot-master-http-2a" {
|
||||
target_group_arn = "${aws_alb_target_group.tg-spot-kr-tcp-30000.arn}"
|
||||
target_id = "${var.master-2a}"
|
||||
port = 30000
|
||||
}
|
||||
|
||||
resource "aws_alb_target_group_attachment" "spot-master-http-2b" {
|
||||
target_group_arn = "${aws_alb_target_group.tg-spot-kr-tcp-30000.arn}"
|
||||
target_id = "${var.master-2b}"
|
||||
port = 30000
|
||||
}
|
||||
|
||||
resource "aws_alb_target_group_attachment" "spot-master-http-2c" {
|
||||
target_group_arn = "${aws_alb_target_group.tg-spot-kr-tcp-30000.arn}"
|
||||
target_id = "${var.master-2c}"
|
||||
port = 30000
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
|
||||
resource "aws_alb_target_group" "tg-spot-kr-tcp-30001" {
|
||||
name = "tg-spot-kr-tcp-30001"
|
||||
port = 30001
|
||||
protocol = "TCP"
|
||||
vpc_id = "${var.VPC_ID}"
|
||||
|
||||
health_check {
|
||||
interval = 30
|
||||
protocol = "TCP"
|
||||
healthy_threshold = 3
|
||||
unhealthy_threshold = 3
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
resource "aws_alb_target_group_attachment" "spot-master-tls-2a" {
|
||||
target_group_arn = "${aws_alb_target_group.tg-spot-kr-tcp-30001.arn}"
|
||||
target_id = "${var.master-2a}"
|
||||
port = 30001
|
||||
}
|
||||
|
||||
resource "aws_alb_target_group_attachment" "spot-master-tls-2b" {
|
||||
target_group_arn = "${aws_alb_target_group.tg-spot-kr-tcp-30001.arn}"
|
||||
target_id = "${var.master-2b}"
|
||||
port = 30001
|
||||
}
|
||||
|
||||
resource "aws_alb_target_group_attachment" "spot-master-tls-2c" {
|
||||
target_group_arn = "${aws_alb_target_group.tg-spot-kr-tcp-30001.arn}"
|
||||
target_id = "${var.master-2c}"
|
||||
port = 30001
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
Reference in New Issue
Block a user