Skip to content

Commit 4503924

Browse files
authored
Merge pull request #384 from ooni/cost-optimize
Cost optimize
2 parents a8ba959 + da07512 commit 4503924

3 files changed

Lines changed: 3 additions & 12 deletions

File tree

tf/environments/dev/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ module "oonipg" {
153153
# see https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Limits.html
154154
# With 1GiB of ram you get ~112 connections:
155155
# 1074000000 / 9531392 = 112.68
156-
db_instance_class = "db.t3.micro" # 2GiB => ~224 max_connections
156+
db_instance_class = "db.t4g.micro" # 2GiB => ~224 max_connections
157157
db_storage_type = "standard"
158158
db_allocated_storage = "5"
159159
db_max_allocated_storage = null

tf/modules/ec2/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ resource "aws_instance" "ooni_ec2" {
9292

9393
root_block_device {
9494
volume_size = var.disk_size # Size in GB
95-
volume_type = "gp2"
95+
volume_type = "gp3"
9696
}
9797

9898
tags = merge(var.tags, { MonitoringActive = var.monitoring_active })

tf/modules/ecs_cluster/main.tf

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ resource "aws_ecs_cluster" "main" {
1919

2020

2121
data "aws_ssm_parameter" "ecs_optimized_ami" {
22-
name = "/aws/service/ecs/optimized-ami/amazon-linux-2/recommended"
22+
name = "/aws/service/ecs/optimized-ami/amazon-linux-2023/recommended"
2323
}
2424

2525
resource "aws_iam_role" "container_host" {
@@ -172,15 +172,6 @@ resource "aws_launch_template" "container_host" {
172172
]
173173
}
174174

175-
block_device_mappings {
176-
device_name = "/dev/sdf"
177-
178-
ebs {
179-
volume_size = var.instance_volume_size
180-
delete_on_termination = true
181-
}
182-
}
183-
184175
tag_specifications {
185176
resource_type = "instance"
186177
tags = merge(

0 commit comments

Comments
 (0)