update ECS deploy to turn on ICE TCP
This commit is contained in:
@@ -4,6 +4,7 @@ locals {
|
|||||||
rtc = {
|
rtc = {
|
||||||
port_range_start = var.udp_port_start
|
port_range_start = var.udp_port_start
|
||||||
port_range_end = var.udp_port_end
|
port_range_end = var.udp_port_end
|
||||||
|
ice_tcp_port = var.ice_tcp_port
|
||||||
}
|
}
|
||||||
turn = {
|
turn = {
|
||||||
enabled = var.turn_enabled
|
enabled = var.turn_enabled
|
||||||
@@ -20,7 +21,7 @@ locals {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// mapping contains only the main listening ports
|
// mapping contains only the main listening ports
|
||||||
// other UDP ports don't have to be mapped, due to
|
// other UDP ports don't have to be mapped, due to using host-mode
|
||||||
port_mapping = [
|
port_mapping = [
|
||||||
{
|
{
|
||||||
containerPort = var.http_port
|
containerPort = var.http_port
|
||||||
@@ -34,6 +35,10 @@ locals {
|
|||||||
containerPort = var.turn_udp_port
|
containerPort = var.turn_udp_port
|
||||||
protocol = "udp"
|
protocol = "udp"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
containerPort = var.ice_tcp_port
|
||||||
|
protocol = "tcp"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
task_config = [{
|
task_config = [{
|
||||||
|
|||||||
@@ -80,6 +80,11 @@ variable "udp_port_end" {
|
|||||||
default = 11000
|
default = 11000
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "ice_tcp_port" {
|
||||||
|
type = number
|
||||||
|
default = 7881
|
||||||
|
}
|
||||||
|
|
||||||
variable "api_keys" {
|
variable "api_keys" {
|
||||||
type = map(string)
|
type = map(string)
|
||||||
}
|
}
|
||||||
@@ -91,7 +96,7 @@ variable "redis_address" {
|
|||||||
|
|
||||||
variable "turn_enabled" {
|
variable "turn_enabled" {
|
||||||
type = bool
|
type = bool
|
||||||
default = true
|
default = false
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "turn_tcp_port" {
|
variable "turn_tcp_port" {
|
||||||
|
|||||||
@@ -15,6 +15,14 @@ resource "aws_security_group" "main" {
|
|||||||
cidr_blocks = ["0.0.0.0/0"]
|
cidr_blocks = ["0.0.0.0/0"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ingress {
|
||||||
|
description = "TCP port for ICE"
|
||||||
|
from_port = var.ice_tcp_port
|
||||||
|
to_port = var.ice_tcp_port
|
||||||
|
protocol = "tcp"
|
||||||
|
cidr_blocks = ["0.0.0.0/0"]
|
||||||
|
}
|
||||||
|
|
||||||
ingress {
|
ingress {
|
||||||
description = "UDP port for TURN"
|
description = "UDP port for TURN"
|
||||||
from_port = var.turn_port_start
|
from_port = var.turn_port_start
|
||||||
|
|||||||
Reference in New Issue
Block a user