spot test 완료 및 자동화 스크립트

This commit is contained in:
havelight-ee
2022-12-08 22:26:48 +09:00
parent 7271592aa1
commit 8391ca915d
13 changed files with 2170 additions and 0 deletions

View 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
}
###############################################################################