Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: create new oonith ecs_cluster #30

Merged
merged 6 commits into from
Apr 2, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion tf/environments/dev/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ resource "aws_s3_bucket" "ooniapi_codepipeline_bucket" {
bucket = "codepipeline-ooniapi-${var.aws_region}-${random_id.artifact_id.hex}"
}

resource "aws_s3_bucket" "oonith_codepipeline_bucket" {
bucket = "codepipeline-oonith-${var.aws_region}-${random_id.artifact_id.hex}"
hellais marked this conversation as resolved.
Show resolved Hide resolved
}

# The aws_codestarconnections_connection resource is created in the state
# PENDING. Authentication with the connection provider must be completed in the
# AWS Console.
Expand All @@ -230,6 +234,13 @@ resource "aws_codestarconnections_connection" "ooniapi" {
depends_on = [module.adm_iam_roles]
}

resource "aws_codestarconnections_connection" "oonith" {
hellais marked this conversation as resolved.
Show resolved Hide resolved
name = "oonith"
provider_type = "GitHub"

depends_on = [module.adm_iam_roles]
}

### OONI Tier0 Backend Proxy

module "ooni_backendproxy" {
Expand Down Expand Up @@ -269,6 +280,26 @@ module "ooniapi_cluster" {
)
}

module "oonith_cluster" {
source = "../../modules/ecs_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

asg_min = 2
asg_max = 6
asg_desired = 2

instance_type = "t2.small"
hellais marked this conversation as resolved.
Show resolved Hide resolved

tags = merge(
local.tags,
{ Name = "ooni-tier0-th-ecs-cluster" }
)
}

#### OONI Tier0

#### OONI Run service
Expand Down Expand Up @@ -378,7 +409,8 @@ module "ooniapi_ooniauth" {
{ Name = "ooni-tier0-ooniauth" }
)
}
### OONI Tier0 API Frontend

#### OONI Tier0 API Frontend

module "ooniapi_frontend" {
source = "../../modules/ooniapi_frontend"
Expand Down
Loading