variable "k8s-prod-master-2a" { default = "i-082bb4e2813521de0" } variable "k8s-prod-master-2b" { default = "i-045a073c83b7f23c2" } variable "k8s-prod-master-2c" { default = "i-049f35ffe56207c62" } ################################################################################## resource "aws_alb_target_group" "tg-prod-kr-tcp-30000" { name = "tg-prod-kr-tcp-30000" port = 30000 protocol = "TCP" vpc_id = aws_vpc.vpc-prod-datasaker.id health_check { interval = 30 protocol = "TCP" healthy_threshold = 3 unhealthy_threshold = 3 } } resource "aws_alb_target_group_attachment" "prod-master-http-2a" { target_group_arn = "${aws_alb_target_group.tg-prod-kr-tcp-30000.arn}" target_id = "${var.k8s-prod-master-2a}" port = 30000 } resource "aws_alb_target_group_attachment" "prod-master-http-2b" { target_group_arn = "${aws_alb_target_group.tg-prod-kr-tcp-30000.arn}" target_id = "${var.k8s-prod-master-2b}" port = 30000 } resource "aws_alb_target_group_attachment" "prod-master-http-2c" { target_group_arn = "${aws_alb_target_group.tg-prod-kr-tcp-30000.arn}" target_id = "${var.k8s-prod-master-2c}" port = 30000 } ############################################################################### resource "aws_alb_target_group" "tg-prod-kr-tcp-30001" { name = "tg-prod-kr-tcp-30001" port = 30001 protocol = "TCP" vpc_id = aws_vpc.vpc-prod-datasaker.id health_check { interval = 30 protocol = "TCP" healthy_threshold = 3 unhealthy_threshold = 3 } } resource "aws_alb_target_group_attachment" "prod-master-tls-2a" { target_group_arn = "${aws_alb_target_group.tg-prod-kr-tcp-30001.arn}" target_id = "${var.k8s-prod-master-2a}" port = 30001 } resource "aws_alb_target_group_attachment" "prod-master-tls-2b" { target_group_arn = "${aws_alb_target_group.tg-prod-kr-tcp-30001.arn}" target_id = "${var.k8s-prod-master-2b}" port = 30001 } resource "aws_alb_target_group_attachment" "prod-master-tls-2c" { target_group_arn = "${aws_alb_target_group.tg-prod-kr-tcp-30001.arn}" target_id = "${var.k8s-prod-master-2c}" port = 30001 } ###############################################################################