Skip to content

Commit

Permalink
WIP on IPv6 support in the container
Browse files Browse the repository at this point in the history
  • Loading branch information
hellais committed Apr 17, 2024
1 parent b4d355a commit 82606fa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
7 changes: 3 additions & 4 deletions tf/modules/ooniapi_service/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ data "aws_ecs_task_definition" "ooniapi_service_current" {
}

resource "aws_ecs_task_definition" "ooniapi_service" {
family = "${local.name}-td"
family = "${local.name}-td"
network_mode = "awsvpc"

container_definitions = jsonencode([
{
cpu = var.task_cpu,
Expand All @@ -58,12 +60,9 @@ resource "aws_ecs_task_definition" "ooniapi_service" {
memory = var.task_memory,
name = local.name,

network_mode = "awsvpc",

portMappings = [
{
containerPort = local.container_port,
hostPort = 0
}
],
environment = [
Expand Down
14 changes: 8 additions & 6 deletions tf/modules/oonith_service/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ data "aws_ecs_task_definition" "oonith_service_current" {

resource "aws_ecs_task_definition" "oonith_service" {
family = "${local.name}-td"

network_mode = "awsvpc"

container_definitions = jsonencode([
{
cpu = var.task_cpu,
Expand All @@ -58,12 +61,10 @@ resource "aws_ecs_task_definition" "oonith_service" {
memory = var.task_memory,
name = local.name,

network_mode = "awsvpc",

portMappings = [
{
containerPort = local.container_port,
hostPort = 0
}
],
environment = [
Expand Down Expand Up @@ -118,10 +119,11 @@ resource "aws_ecs_service" "oonith_service" {

# The direct
resource "aws_alb_target_group" "oonith_service_direct" {
name = "${local.name}-direct"
port = 80
protocol = "HTTP"
vpc_id = var.vpc_id
name = "${local.name}-direct"
port = 80
protocol = "HTTP"
vpc_id = var.vpc_id
target_type = "ip"

tags = var.tags
}
Expand Down

0 comments on commit 82606fa

Please sign in to comment.