automatic configuration of TURN, with per-room credentials. version 0.6.0

This commit is contained in:
David Zhao
2021-03-07 23:30:21 -08:00
parent 048cdf9751
commit e20c831c14
18 changed files with 220 additions and 79 deletions
+4 -6
View File
@@ -1,23 +1,21 @@
// configure target group
resource "aws_lb_target_group" "main" {
name = "livekit-${var.name}"
resource "aws_lb_target_group" "http" {
name = "livekit-${var.name}-http"
port = 80
protocol = "HTTP"
vpc_id = data.aws_vpc.main.id
}
resource "aws_lb" "main" {
name = "livekit-${var.name}"
name = "livekit-${var.name}-http"
internal = false
load_balancer_type = "application"
security_groups = [aws_security_group.lb.id]
subnets = var.subnet_ids
}
// TODO: HTTPS
resource "aws_lb_listener" "http" {
load_balancer_arn = aws_lb.main.arn
port = "80"
@@ -26,6 +24,6 @@ resource "aws_lb_listener" "http" {
default_action {
type = "forward"
target_group_arn = aws_lb_target_group.main.arn
target_group_arn = aws_lb_target_group.http.arn
}
}