Skip to content

Commit 3edf2b9

Browse files
committed
Fix RDS instance type, upgrade AWS tf module, fix too many concurrent events error, upgrade retool instance for Retool-ECS-EC2
1 parent 2feb450 commit 3edf2b9

File tree

4 files changed

+15
-13
lines changed

4 files changed

+15
-13
lines changed

modules/aws_ecs_ec2/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
This module deploys an ECS cluster with autoscaling group of EC2 instances.
44

55
# Usage
6+
67
1. Directly use our module in your existing Terraform configuration and provide the required variables
78

89
```
@@ -45,12 +46,12 @@ module "retool" {
4546
To configure the EC instance size, set the `instance_type` input variable (e.g. `t2.large`).
4647

4748
**RDS Instance Class**
48-
To configure the RDS instance class, set the `instance_class` input variable (e.g. `db.m4.large`).
49+
To configure the RDS instance class, set the `instance_class` input variable (e.g. `db.m6g.large`).
4950

5051
## Advanced Configuration
5152

52-
5353
### Security Groups
54+
5455
To customize the ingress and egress rules on the security groups, you can override specific input variable defaults.
5556

5657
- `ec2_ingress_rules` controls the inbound rules for EC2 instances in the autoscaling group
@@ -99,6 +100,7 @@ ec2_egress_rules = [
99100
```
100101

101102
### Environment Variables
103+
102104
To add additional [Retool environment variables](https://docs.retool.com/docs/environment-variables) to your deployment, populate the `additional_env_vars` input variable into the module.
103105

104106
NOTE: The `additional_env_vars` will only work as type `map(string)`. Convert all booleans and numbers into strings, e.g.

modules/aws_ecs_ec2/main.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
aws = {
44
source = "hashicorp/aws"
5-
version = "3.50.0"
5+
version = "~> 4.0"
66
}
77
}
88
}
@@ -144,12 +144,12 @@ resource "aws_cloudwatch_log_group" "this" {
144144
}
145145

146146
resource "aws_db_instance" "this" {
147-
identifier = "${var.deployment_name}-rds-instance"
147+
identifier = "${var.deployment_name}-rds-instance"
148148
allocated_storage = 80
149149
instance_class = var.rds_instance_class
150150
engine = "postgres"
151-
engine_version = "10.6"
152-
name = "hammerhead_production"
151+
engine_version = "13.7"
152+
db_name = "hammerhead_production"
153153
username = aws_secretsmanager_secret_version.rds_username.secret_string
154154
password = aws_secretsmanager_secret_version.rds_password.secret_string
155155
port = 5432
@@ -158,7 +158,7 @@ resource "aws_db_instance" "this" {
158158
performance_insights_enabled = var.rds_performance_insights_enabled
159159

160160
skip_final_snapshot = true
161-
apply_immediately = true
161+
apply_immediately = true
162162
}
163163

164164
resource "aws_ecs_service" "retool" {
@@ -184,7 +184,7 @@ resource "aws_ecs_service" "jobs_runner" {
184184
task_definition = aws_ecs_task_definition.retool_jobs_runner.arn
185185
}
186186
resource "aws_ecs_task_definition" "retool_jobs_runner" {
187-
family = "retool"
187+
family = "retool-jobs-runner"
188188
task_role_arn = aws_iam_role.task_role.arn
189189
container_definitions = jsonencode(
190190
[

modules/aws_ecs_ec2/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ output "rds_instance_arn" {
3939
}
4040

4141
output "rds_instance_name" {
42-
value = aws_db_instance.this.name
42+
value = aws_db_instance.this.db_name
4343
description = "Name of RDS instance"
4444
}

modules/aws_ecs_ec2/variables.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ variable "retool_license_key" {
5757

5858
variable "ecs_retool_image" {
5959
type = string
60-
description = "Container image for desired Retool version. Defaults to `2.96.2`"
61-
default = "tryretool/backend:2.96.2"
60+
description = "Container image for desired Retool version. Defaults to `2.106.2`"
61+
default = "tryretool/backend:2.106.2"
6262
}
6363

6464
variable "ecs_task_cpu" {
@@ -93,8 +93,8 @@ variable "rds_username" {
9393

9494
variable "rds_instance_class" {
9595
type = string
96-
default = "db.m4.large"
97-
description = "Instance class for RDS. Defaults to `db.m4.large`"
96+
default = "db.m6g.large"
97+
description = "Instance class for RDS. Defaults to `db.m6g.large`"
9898
}
9999

100100
variable "rds_publicly_accessible" {

0 commit comments

Comments
 (0)