update ECS deploy to turn on ICE TCP

This commit is contained in:
David Zhao
2021-04-11 00:01:06 -07:00
parent 46f98896a1
commit 9a5188d620
3 changed files with 20 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ locals {
rtc = {
port_range_start = var.udp_port_start
port_range_end = var.udp_port_end
ice_tcp_port = var.ice_tcp_port
}
turn = {
enabled = var.turn_enabled
@@ -20,7 +21,7 @@ locals {
}
// 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 = [
{
containerPort = var.http_port
@@ -34,6 +35,10 @@ locals {
containerPort = var.turn_udp_port
protocol = "udp"
},
{
containerPort = var.ice_tcp_port
protocol = "tcp"
}
]
task_config = [{

View File

@@ -80,6 +80,11 @@ variable "udp_port_end" {
default = 11000
}
variable "ice_tcp_port" {
type = number
default = 7881
}
variable "api_keys" {
type = map(string)
}
@@ -91,7 +96,7 @@ variable "redis_address" {
variable "turn_enabled" {
type = bool
default = true
default = false
}
variable "turn_tcp_port" {

View File

@@ -15,6 +15,14 @@ resource "aws_security_group" "main" {
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 {
description = "UDP port for TURN"
from_port = var.turn_port_start