File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,11 @@ resource "aws_cloudwatch_log_group" "this" {
16
16
retention_in_days = var. log_retention_in_days
17
17
}
18
18
19
+ resource "aws_db_subnet_group" "this" {
20
+ name = " ${ var . deployment_name } -retool"
21
+ subnet_ids = var. subnet_ids
22
+ }
23
+
19
24
resource "aws_db_instance" "this" {
20
25
identifier = " ${ var . deployment_name } -rds-instance"
21
26
allocated_storage = 80
@@ -28,6 +33,7 @@ resource "aws_db_instance" "this" {
28
33
port = 5432
29
34
publicly_accessible = var. rds_publicly_accessible
30
35
vpc_security_group_ids = [aws_security_group . rds . id ]
36
+ db_subnet_group_name = aws_db_subnet_group. this . id
31
37
performance_insights_enabled = var. rds_performance_insights_enabled
32
38
33
39
skip_final_snapshot = true
@@ -415,4 +421,4 @@ module "temporal" {
415
421
launch_type = var. launch_type
416
422
container_sg_id = aws_security_group. containers . id
417
423
aws_ecs_capacity_provider_name = var. launch_type == " EC2" ? aws_ecs_capacity_provider. this [0 ]. name : null
418
- }
424
+ }
Original file line number Diff line number Diff line change 1
1
resource "aws_security_group" "rds" {
2
2
name = " ${ var . deployment_name } -rds-security-group"
3
3
description = " Retool database security group"
4
+ vpc_id = var. vpc_id
4
5
5
6
ingress {
6
7
description = " Retool ECS Postgres Inbound"
@@ -105,4 +106,4 @@ resource "aws_vpc_security_group_ingress_rule" "containers_self_ingress" {
105
106
description = " Allow self-ingress for inter-container communication"
106
107
referenced_security_group_id = aws_security_group. containers . id
107
108
ip_protocol = - 1
108
- }
109
+ }
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ variable "rds_instance_class" {
113
113
114
114
variable "rds_publicly_accessible" {
115
115
type = bool
116
- default = true
116
+ default = false
117
117
description = " Whether the RDS instance should be publicly accessible. Defaults to false."
118
118
}
119
119
You can’t perform that action at this time.
0 commit comments