Skip to content

Commit

Permalink
Apply subnet refactoring to prod env
Browse files Browse the repository at this point in the history
  • Loading branch information
hellais committed Apr 19, 2024
1 parent 2f0018c commit 5965570
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions tf/environments/prod/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ module "oonipg" {
name = "ooni-tier0-postgres"
aws_region = var.aws_region
vpc_id = module.network.vpc_id
subnet_ids = module.network.vpc_subnet[*].id
subnet_ids = module.network.vpc_subnet_public[*].id
db_instance_class = "db.t3.micro"
db_storage_type = "standard"
db_allocated_storage = "5"
Expand Down Expand Up @@ -256,7 +256,7 @@ module "ooni_backendproxy" {
source = "../../modules/ooni_backendproxy"

vpc_id = module.network.vpc_id
subnet_ids = module.network.vpc_subnet[*].id
subnet_ids = module.network.vpc_subnet_public[*].id

key_name = module.adm_iam_roles.oonidevops_key_name
instance_type = "t2.micro"
Expand All @@ -275,7 +275,7 @@ module "ooniapi_cluster" {
name = "ooniapi-ecs-cluster"
key_name = module.adm_iam_roles.oonidevops_key_name
vpc_id = module.network.vpc_id
subnet_ids = module.network.vpc_subnet[*].id
subnet_ids = module.network.vpc_subnet_public[*].id

asg_min = 2
asg_max = 6
Expand All @@ -295,7 +295,7 @@ module "oonith_cluster" {
name = "oonith-ecs-cluster"
key_name = module.adm_iam_roles.oonidevops_key_name
vpc_id = module.network.vpc_id
subnet_ids = module.network.vpc_subnet[*].id
subnet_ids = module.network.vpc_subnet_public[*].id

asg_min = 2
asg_max = 6
Expand Down Expand Up @@ -334,8 +334,9 @@ module "ooniapi_ooniprobe" {
# First run should be set on first run to bootstrap the task definition
#first_run = true

vpc_id = module.network.vpc_id
subnet_ids = module.network.vpc_subnet[*].id
vpc_id = module.network.vpc_id
private_subnet_ids = module.network.vpc_subnet_private[*].id
public_subnet_ids = module.network.vpc_subnet_public[*].id

service_name = "ooniprobe"
default_docker_image_url = "ooni/api-ooniprobe:latest"
Expand Down Expand Up @@ -382,8 +383,9 @@ module "ooniapi_oonirun" {
source = "../../modules/ooniapi_service"
#first_run = true

vpc_id = module.network.vpc_id
subnet_ids = module.network.vpc_subnet[*].id
vpc_id = module.network.vpc_id
private_subnet_ids = module.network.vpc_subnet_private[*].id
public_subnet_ids = module.network.vpc_subnet_public[*].id

service_name = "oonirun"
default_docker_image_url = "ooni/api-oonirun:latest"
Expand Down Expand Up @@ -429,8 +431,9 @@ module "ooniapi_ooniauth" {
source = "../../modules/ooniapi_service"
#first_run = true

vpc_id = module.network.vpc_id
subnet_ids = module.network.vpc_subnet[*].id
vpc_id = module.network.vpc_id
private_subnet_ids = module.network.vpc_subnet_private[*].id
public_subnet_ids = module.network.vpc_subnet_public[*].id

service_name = "ooniauth"
default_docker_image_url = "ooni/api-ooniauth:latest"
Expand Down Expand Up @@ -480,7 +483,7 @@ module "ooniapi_frontend" {
source = "../../modules/ooniapi_frontend"

vpc_id = module.network.vpc_id
subnet_ids = module.network.vpc_subnet[*].id
subnet_ids = module.network.vpc_subnet_public[*].id

oonibackend_proxy_target_group_arn = module.ooni_backendproxy.alb_target_group_id
ooniapi_oonirun_target_group_arn = module.ooniapi_oonirun.alb_target_group_id
Expand Down Expand Up @@ -521,8 +524,9 @@ module "oonith_oohelperd" {
source = "../../modules/oonith_service"
#first_run = true

vpc_id = module.network.vpc_id
subnet_ids = module.network.vpc_subnet[*].id
vpc_id = module.network.vpc_id
private_subnet_ids = module.network.vpc_subnet_private[*].id
public_subnet_ids = module.network.vpc_subnet_public[*].id

service_name = "oohelperd"
default_docker_image_url = "ooni/oonith-oohelperd:latest"
Expand Down

0 comments on commit 5965570

Please sign in to comment.