ECS scripts to deploy single port mode

This commit is contained in:
David Zhao
2021-04-12 22:46:29 -07:00
parent c2777cd556
commit 6c5bd4ce42
4 changed files with 25 additions and 9 deletions
+3 -2
View File
@@ -4,7 +4,8 @@ locals {
rtc = {
port_range_start = var.udp_port_start
port_range_end = var.udp_port_end
ice_tcp_port = var.ice_tcp_port
tcp_port = var.rtc_tcp_port
udp_port = var.rtc_udp_port
}
turn = {
enabled = var.turn_enabled
@@ -36,7 +37,7 @@ locals {
protocol = "udp"
},
{
containerPort = var.ice_tcp_port
containerPort = var.rtc_tcp_port
protocol = "tcp"
}
]
+10 -3
View File
@@ -70,21 +70,28 @@ variable "http_port" {
default = 7880
}
// not set by default, prefers rtc_udp_port
variable "udp_port_start" {
type = number
default = 9000
default = 0
}
// not set by default, prefers rtc_udp_port
variable "udp_port_end" {
type = number
default = 11000
default = 0
}
variable "ice_tcp_port" {
variable "rtc_tcp_port" {
type = number
default = 7881
}
variable "rtc_udp_port" {
type = number
default = 9000
}
variable "api_keys" {
type = map(string)
}
+11 -3
View File
@@ -8,17 +8,25 @@ resource "aws_security_group" "main" {
vpc_id = data.aws_vpc.main.id
ingress {
description = "UDP port for ICE"
description = "UDP port range for ICE"
from_port = var.udp_port_start
to_port = var.udp_port_end
protocol = "udp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
description = "UDP port for ICE"
from_port = var.rtc_udp_port
to_port = var.rtc_udp_port
protocol = "udp"
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
from_port = var.rtc_tcp_port
to_port = var.rtc_tcp_port
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
+1 -1
View File
@@ -1,3 +1,3 @@
package version
const Version = "0.7.5"
const Version = "0.8.0a"