In Terraform
How can register known private ip addresses in target group of type "ip". Below is my current code.
resource "aws_alb_target_group" "default" {
name = "target group name"
port = var.container_port
protocol = "HTTP"
target_type = "ip"
vpc_id = data.terraform_remote_state.network.outputs.vpc_id
health_check {
path = var.health_check_path
protocol = "HTTP"
port = var.target_group_port
interval = 60
}
tags = var.tags
}
You use aws_lb_target_group_attachment for that.
For example: