From 797f5670021b3fb640ad5dabf0b0e095d583540e Mon Sep 17 00:00:00 2001 From: Tian-T000 Date: Mon, 28 Jul 2025 13:35:27 +1000 Subject: [PATCH 01/15] added permissions for network --- infra/setup/iam.tf | 61 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/infra/setup/iam.tf b/infra/setup/iam.tf index 8731c69..d1459c5 100644 --- a/infra/setup/iam.tf +++ b/infra/setup/iam.tf @@ -81,4 +81,65 @@ resource "aws_iam_policy" "ecr" { resource "aws_iam_user_policy_attachment" "ecr" { user = aws_iam_user.cd.name policy_arn = aws_iam_policy.ecr.arn +} + + +######################### +# Policy for EC2 access # +######################### + +data "aws_iam_policy_document" "ec2" { + statement { + effect = "Allow" + actions = [ + "ec2:DescribeVpcs", + "ec2:CreateTags", + "ec2:CreateVpc", + "ec2:DeleteVpc", + "ec2:DescribeSecurityGroups", + "ec2:DeleteSubnet", + "ec2:DeleteSecurityGroup", + "ec2:DescribeNetworkInterfaces", + "ec2:DetachInternetGateway", + "ec2:DescribeInternetGateways", + "ec2:DeleteInternetGateway", + "ec2:DetachNetworkInterface", + "ec2:DescribeVpcEndpoints", + "ec2:DescribeRouteTables", + "ec2:DeleteRouteTable", + "ec2:DeleteVpcEndpoints", + "ec2:DisassociateRouteTable", + "ec2:DeleteRoute", + "ec2:DescribePrefixLists", + "ec2:DescribeSubnets", + "ec2:DescribeVpcAttribute", + "ec2:DescribeNetworkAcls", + "ec2:AssociateRouteTable", + "ec2:AuthorizeSecurityGroupIngress", + "ec2:RevokeSecurityGroupEgress", + "ec2:CreateSecurityGroup", + "ec2:AuthorizeSecurityGroupEgress", + "ec2:CreateVpcEndpoint", + "ec2:ModifySubnetAttribute", + "ec2:CreateSubnet", + "ec2:CreateRoute", + "ec2:CreateRouteTable", + "ec2:CreateInternetGateway", + "ec2:AttachInternetGateway", + "ec2:ModifyVpcAttribute", + "ec2:RevokeSecurityGroupIngress", + ] + resources = ["*"] + } +} + +resource "aws_iam_policy" "ec2" { + name = "${aws_iam_user.cd.name}-ec2" + description = "Allow user to manage EC2 resources." + policy = data.aws_iam_policy_document.ec2.json +} + +resource "aws_iam_user_policy_attachment" "ec2" { + user = aws_iam_user.cd.name + policy_arn = aws_iam_policy.ec2.arn } \ No newline at end of file From 1979375bf35110af9e092cbc5b8878664373eb0d Mon Sep 17 00:00:00 2001 From: Tian-T000 Date: Tue, 29 Jul 2025 08:48:03 +1000 Subject: [PATCH 02/15] added vpc --- infra/deploy/network.tf | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 infra/deploy/network.tf diff --git a/infra/deploy/network.tf b/infra/deploy/network.tf new file mode 100644 index 0000000..1bed232 --- /dev/null +++ b/infra/deploy/network.tf @@ -0,0 +1,22 @@ +##Network infra ## + +########################## +# Network infrastructure # +########################## + +resource "aws_vpc" "main" { + cidr_block = "10.1.0.0/16" + enable_dns_hostnames = true + enable_dns_support = true +} + +######################################################### +# Internet Gateway needed for inbound access to the ALB # +######################################################### +resource "aws_internet_gateway" "main" { + vpc_id = aws_vpc.main.id + + tags = { + Name = "${local.prefix}-main" + } +} \ No newline at end of file From 0becf49566ae70382ceb8cbda5828d688783888f Mon Sep 17 00:00:00 2001 From: Tian-T000 Date: Wed, 30 Jul 2025 12:36:13 +1000 Subject: [PATCH 03/15] added network --- infra/deploy/network.tf | 63 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/infra/deploy/network.tf b/infra/deploy/network.tf index 1bed232..4ff70d1 100644 --- a/infra/deploy/network.tf +++ b/infra/deploy/network.tf @@ -19,4 +19,67 @@ resource "aws_internet_gateway" "main" { tags = { Name = "${local.prefix}-main" } +} + +################################################## +# Public subnets for load balancer public access # +################################################## +resource "aws_subnet" "public_a" { + vpc_id = aws_vpc.main.id + cidr_block = "10.1.1.0/24" + map_public_ip_on_launch = true + availability_zone = "${data.aws_region.current.name}a" + + tags = { + Name = "${local.prefix}-public-a" + } +} + +resource "aws_route_table" "public_a" { + vpc_id = aws_vpc.main.id + + tags = { + Name = "${local.prefix}-public-a" + } +} + +resource "aws_route_table_association" "public_a" { + subnet_id = aws_subnet.public_a.id + route_table_id = aws_route_table.public_a.id +} + +resource "aws_route" "public_internet_access_a" { + route_table_id = aws_route_table.public_a.id + destination_cidr_block = "0.0.0.0/0" + gateway_id = aws_internet_gateway.main.id +} + +resource "aws_subnet" "public_b" { + vpc_id = aws_vpc.main.id + cidr_block = "10.1.2.0/24" + map_public_ip_on_launch = true + availability_zone = "${data.aws_region.current.name}b" + + tags = { + Name = "${local.prefix}-public-b" + } +} + +resource "aws_route_table" "public_b" { + vpc_id = aws_vpc.main.id + + tags = { + Name = "${local.prefix}-public-b" + } +} + +resource "aws_route_table_association" "public_b" { + subnet_id = aws_subnet.public_b.id + route_table_id = aws_route_table.public_b.id +} + +resource "aws_route" "public_internet_access_b" { + route_table_id = aws_route_table.public_b.id + destination_cidr_block = "0.0.0.0/0" + gateway_id = aws_internet_gateway.main.id } \ No newline at end of file From 44a16801130aa645f6b0acc99cb69d1ac854bb48 Mon Sep 17 00:00:00 2001 From: Tian-T000 Date: Wed, 30 Jul 2025 12:51:32 +1000 Subject: [PATCH 04/15] added private subnets --- infra/deploy/network.tf | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/infra/deploy/network.tf b/infra/deploy/network.tf index 4ff70d1..08341e7 100644 --- a/infra/deploy/network.tf +++ b/infra/deploy/network.tf @@ -82,4 +82,27 @@ resource "aws_route" "public_internet_access_b" { route_table_id = aws_route_table.public_b.id destination_cidr_block = "0.0.0.0/0" gateway_id = aws_internet_gateway.main.id +} + +############################################ +# Private Subnets for internal access only # +############################################ +resource "aws_subnet" "private_a" { + vpc_id = aws_vpc.main.id + cidr_block = "10.1.10.0/24" + availability_zone = "${data.aws_region.current.name}a" + + tags = { + Name = "${local.prefix}-private-a" + } +} + +resource "aws_subnet" "private_b" { + vpc_id = aws_vpc.main.id + cidr_block = "10.1.11.0/24" + availability_zone = "${data.aws_region.current.name}b" + + tags = { + Name = "${local.prefix}-private-b" + } } \ No newline at end of file From 8d7fa9123b446477cab5cfeaa13120bd158d38c7 Mon Sep 17 00:00:00 2001 From: Tian-T000 Date: Fri, 1 Aug 2025 11:35:25 +1000 Subject: [PATCH 05/15] added endpoints --- infra/deploy/network.tf | 98 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/infra/deploy/network.tf b/infra/deploy/network.tf index 08341e7..7b883f0 100644 --- a/infra/deploy/network.tf +++ b/infra/deploy/network.tf @@ -105,4 +105,102 @@ resource "aws_subnet" "private_b" { tags = { Name = "${local.prefix}-private-b" } +} + + +######################################################################### +## Endpoints to allow ECS to access ECR, CloudWatch and Systems Manager # +######################################################################### + +resource "aws_security_group" "endpoint_access" { + description = "Access to endpoints" + name = "${local.prefix}-endpoint-access" + vpc_id = aws_vpc.main.id + + ingress { + cidr_blocks = [aws_vpc.main.cidr_block] + from_port = 443 + to_port = 443 + protocol = "tcp" + } +} + +resource "aws_vpc_endpoint" "ecr" { + vpc_id = aws_vpc.main.id + service_name = "com.amazonaws.${data.aws_region.current.name}.ecr.api" + vpc_endpoint_type = "Interface" + private_dns_enabled = true + + subnet_ids = [aws_subnet.private_a.id, aws_subnet.private_b.id] + + security_group_ids = [ + aws_security_group.endpoint_access.id + ] + + tags = { + Name = "${local.prefix}-ecr-endpoint" + } +} + +resource "aws_vpc_endpoint" "dkr" { + vpc_id = aws_vpc.main.id + service_name = "com.amazonaws.${data.aws_region.current.name}.ecr.dkr" + vpc_endpoint_type = "Interface" + private_dns_enabled = true + + subnet_ids = [aws_subnet.private_a.id, aws_subnet.private_b.id] + + security_group_ids = [ + aws_security_group.endpoint_access.id + ] + + tags = { + Name = "${local.prefix}-dkr-endpoint" + } +} + +resource "aws_vpc_endpoint" "cloudwatch_logs" { + vpc_id = aws_vpc.main.id + service_name = "com.amazonaws.${data.aws_region.current.name}.logs" + vpc_endpoint_type = "Interface" + private_dns_enabled = true + + subnet_ids = [aws_subnet.private_a.id, aws_subnet.private_b.id] + + security_group_ids = [ + aws_security_group.endpoint_access.id + ] + + tags = { + Name = "${local.prefix}-cloudwatch-endpoint" + } +} + +resource "aws_vpc_endpoint" "ssm" { + vpc_id = aws_vpc.main.id + service_name = "com.amazonaws.${data.aws_region.current.name}.ssmmessages" + vpc_endpoint_type = "Interface" + private_dns_enabled = true + + subnet_ids = [aws_subnet.private_a.id, aws_subnet.private_b.id] + + security_group_ids = [ + aws_security_group.endpoint_access.id + ] + + tags = { + Name = "${local.prefix}-ssmmessages-endpoint" + } +} + +resource "aws_vpc_endpoint" "s3" { + vpc_id = aws_vpc.main.id + service_name = "com.amazonaws.${data.aws_region.current.name}.s3" + vpc_endpoint_type = "Gateway" + route_table_ids = [ + aws_vpc.main.default_route_table_id + ] + tags = { + Name = "${local.prefix}-s3-endpoint" + } } \ No newline at end of file From cbc0e4619fd6d65ae9e1d5ecae3f7d1540fda205 Mon Sep 17 00:00:00 2001 From: Tian-T000 Date: Fri, 1 Aug 2025 12:17:07 +1000 Subject: [PATCH 06/15] update iam user for rds --- infra/setup/iam.tf | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/infra/setup/iam.tf b/infra/setup/iam.tf index d1459c5..8a450bf 100644 --- a/infra/setup/iam.tf +++ b/infra/setup/iam.tf @@ -142,4 +142,37 @@ resource "aws_iam_policy" "ec2" { resource "aws_iam_user_policy_attachment" "ec2" { user = aws_iam_user.cd.name policy_arn = aws_iam_policy.ec2.arn +} + + +######################### +# Policy for RDS access # +######################### + +data "aws_iam_policy_document" "rds" { + statement { + effect = "Allow" + actions = [ + "rds:DescribeDBSubnetGroups", + "rds:DescribeDBInstances", + "rds:CreateDBSubnetGroup", + "rds:DeleteDBSubnetGroup", + "rds:CreateDBInstance", + "rds:DeleteDBInstance", + "rds:ListTagsForResource", + "rds:ModifyDBInstance" + ] + resources = ["*"] + } +} + +resource "aws_iam_policy" "rds" { + name = "${aws_iam_user.cd.name}-rds" + description = "Allow user to manage RDS resources." + policy = data.aws_iam_policy_document.rds.json +} + +resource "aws_iam_user_policy_attachment" "rds" { + user = aws_iam_user.cd.name + policy_arn = aws_iam_policy.rds.arn } \ No newline at end of file From f5e9559ed650d387c9e7fbf1471bbc71ebe8a8dc Mon Sep 17 00:00:00 2001 From: Tian-T000 Date: Sat, 2 Aug 2025 13:02:09 +1000 Subject: [PATCH 07/15] added rds instance --- infra/deploy/database.tf | 53 +++++++++++++++++++++++++++++++++++++++ infra/deploy/variables.tf | 9 +++++++ infra/docker-compose.yml | 3 ++- 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 infra/deploy/database.tf diff --git a/infra/deploy/database.tf b/infra/deploy/database.tf new file mode 100644 index 0000000..17e8f6e --- /dev/null +++ b/infra/deploy/database.tf @@ -0,0 +1,53 @@ +############ +# Database # +############ + +resource "aws_db_subnet_group" "main" { + name = "${local.prefix}-main" + subnet_ids = [ + aws_subnet.private_a.id, + aws_subnet.private_b.id + ] + + tags = { + Name = "${local.prefix}-db-subnet-group" + } +} + +resource "aws_security_group" "rds" { + description = "Allow access to the RDS database instance." + name = "${local.prefix}-rds-inbound-access" + vpc_id = aws_vpc.main.id + + ingress { + protocol = "tcp" + from_port = 5432 + to_port = 5432 + } + + tags = { + Name = "${local.prefix}-db-security-group" + } +} + +resource "aws_db_instance" "main" { + identifier = "${local.prefix}-db" + db_name = "recipe" + allocated_storage = 20 + storage_type = "gp2" + engine = "postgres" + engine_version = "15.3" + auto_minor_version_upgrade = true + instance_class = "db.t4g.micro" + username = var.db_username + password = var.db_password + skip_final_snapshot = true + db_subnet_group_name = aws_db_subnet_group.main.name + multi_az = false + backup_retention_period = 0 + vpc_security_group_ids = [aws_security_group.rds.id] + + tags = { + Name = "${local.prefix}-main" + } +} \ No newline at end of file diff --git a/infra/deploy/variables.tf b/infra/deploy/variables.tf index 45582ef..180a9f5 100644 --- a/infra/deploy/variables.tf +++ b/infra/deploy/variables.tf @@ -12,4 +12,13 @@ variable "project" { variable "contact" { description = "Contact email for tagging resources" default = "mark@example.com" +} + +variable "db_username" { + description = "Username for the recipe app api database" + default = "recipeapp" +} + +variable "db_password" { + description = "Password for the Terraform database" } \ No newline at end of file diff --git a/infra/docker-compose.yml b/infra/docker-compose.yml index 9061a71..81450f7 100644 --- a/infra/docker-compose.yml +++ b/infra/docker-compose.yml @@ -10,4 +10,5 @@ services: - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} - AWS_SESSION_TOKEN=${AWS_SESSION_TOKEN} - AWS_DEFAULT_REGION=ap-southeast-2 - - TF_WORKSPACE=${TF_WORKSPACE} \ No newline at end of file + - TF_WORKSPACE=${TF_WORKSPACE} + - TF_VAR_db_password=${TF_VAR_db_password} \ No newline at end of file From fcc16b58b7ab138cb56c67a3e08c42cafd0966a9 Mon Sep 17 00:00:00 2001 From: Tian-T000 Date: Sat, 2 Aug 2025 16:13:54 +1000 Subject: [PATCH 08/15] added rds instance --- infra/setup/iam.tf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/infra/setup/iam.tf b/infra/setup/iam.tf index 8a450bf..460bd78 100644 --- a/infra/setup/iam.tf +++ b/infra/setup/iam.tf @@ -160,7 +160,8 @@ data "aws_iam_policy_document" "rds" { "rds:CreateDBInstance", "rds:DeleteDBInstance", "rds:ListTagsForResource", - "rds:ModifyDBInstance" + "rds:ModifyDBInstance", + "rds:AddTagsToResource" ] resources = ["*"] } From 666eebb45b0cc636e376a23b5f6a4415e5bb5f82 Mon Sep 17 00:00:00 2001 From: Tian-T000 Date: Sat, 2 Aug 2025 16:52:13 +1000 Subject: [PATCH 09/15] updated added rds instance --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6665e07..4210e4c 100644 --- a/README.md +++ b/README.md @@ -227,4 +227,4 @@ Or find them below: - [Deploy a Serverless Django App on Google App Engine](https://londonapp.dev/c5) -hello 123 \ No newline at end of file +hello 12345 \ No newline at end of file From 3bb8af342f2ead3805c46881926daf2c4918f298 Mon Sep 17 00:00:00 2001 From: Tian-T000 Date: Sat, 2 Aug 2025 17:13:22 +1000 Subject: [PATCH 10/15] updated added rds instances --- README.md | 2 +- infra/setup/iam.tf | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6665e07..8f26783 100644 --- a/README.md +++ b/README.md @@ -227,4 +227,4 @@ Or find them below: - [Deploy a Serverless Django App on Google App Engine](https://londonapp.dev/c5) -hello 123 \ No newline at end of file +hello 123456 \ No newline at end of file diff --git a/infra/setup/iam.tf b/infra/setup/iam.tf index 8a450bf..460bd78 100644 --- a/infra/setup/iam.tf +++ b/infra/setup/iam.tf @@ -160,7 +160,8 @@ data "aws_iam_policy_document" "rds" { "rds:CreateDBInstance", "rds:DeleteDBInstance", "rds:ListTagsForResource", - "rds:ModifyDBInstance" + "rds:ModifyDBInstance", + "rds:AddTagsToResource" ] resources = ["*"] } From db5aa839b1a934fa8a9be951be323053df5922a3 Mon Sep 17 00:00:00 2001 From: Tian-T000 Date: Sat, 2 Aug 2025 18:28:12 +1000 Subject: [PATCH 11/15] added new rds iam --- infra/setup/iam.tf | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/infra/setup/iam.tf b/infra/setup/iam.tf index 8a450bf..20cdae6 100644 --- a/infra/setup/iam.tf +++ b/infra/setup/iam.tf @@ -160,10 +160,31 @@ data "aws_iam_policy_document" "rds" { "rds:CreateDBInstance", "rds:DeleteDBInstance", "rds:ListTagsForResource", - "rds:ModifyDBInstance" + "rds:ModifyDBInstance", + "rds:AddTagsToResource" ] resources = ["*"] } + + statement { + sid = "CreateRdsServiceLinkedRole" #optional + effect = "Allow" + actions = [ + "iam:CreateServiceLinkedRole", + "iam:DeleteServiceLinkedRole" + ] + resources = [ + "arn:aws:iam::*:role/aws-service-role/rds.amazonaws.com/AWSServiceRoleForRDS" + ] + condition { + test = "StringEquals" + variable = "iam:AWSServiceName" + values = ["rds.amazonaws.com"] + } + } + + + } resource "aws_iam_policy" "rds" { From 547e4c487bd2fba5df34e55e4782e4cab760a68a Mon Sep 17 00:00:00 2001 From: Tian-T000 Date: Sat, 2 Aug 2025 22:54:21 +1000 Subject: [PATCH 12/15] updated iam --- infra/setup/iam.tf | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/infra/setup/iam.tf b/infra/setup/iam.tf index 20cdae6..16a7846 100644 --- a/infra/setup/iam.tf +++ b/infra/setup/iam.tf @@ -128,6 +128,7 @@ data "aws_iam_policy_document" "ec2" { "ec2:AttachInternetGateway", "ec2:ModifyVpcAttribute", "ec2:RevokeSecurityGroupIngress", + "ec2:DescribeAvailabilityZones" ] resources = ["*"] } @@ -187,6 +188,30 @@ data "aws_iam_policy_document" "rds" { } +data "aws_iam_policy_document" "service_linked_rds" { + statement { + effect = "Allow" + actions = ["iam:CreateServiceLinkedRole"] + resources = ["arn:aws:iam::*:role/aws-service-role/rds.amazonaws.com/AWSServiceRoleForRDS"] + condition { + test = "StringLike" + variable = "iam:AWSServiceName" + values = ["rds.amazonaws.com"] + } + } +} + +resource "aws_iam_policy" "service_linked_rds" { + name = "${aws_iam_user.cd.name}-service_linked_rds" + description = "Allow Amazon RDS to call AWS services on behalf of your DB instances." + policy = data.aws_iam_policy_document.service_linked_rds.json +} + +resource "aws_iam_user_policy_attachment" "service_linked_rds" { + user = aws_iam_user.cd.name + policy_arn = aws_iam_policy.service_linked_rds.arn +} + resource "aws_iam_policy" "rds" { name = "${aws_iam_user.cd.name}-rds" description = "Allow user to manage RDS resources." From 96c00380ecbda35f2e7dc4951280b0059482fa78 Mon Sep 17 00:00:00 2001 From: Tian-T000 Date: Sat, 2 Aug 2025 23:54:02 +1000 Subject: [PATCH 13/15] add linked rds --- infra/setup/iam.tf | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/infra/setup/iam.tf b/infra/setup/iam.tf index 16a7846..b9cf15a 100644 --- a/infra/setup/iam.tf +++ b/infra/setup/iam.tf @@ -167,24 +167,6 @@ data "aws_iam_policy_document" "rds" { resources = ["*"] } - statement { - sid = "CreateRdsServiceLinkedRole" #optional - effect = "Allow" - actions = [ - "iam:CreateServiceLinkedRole", - "iam:DeleteServiceLinkedRole" - ] - resources = [ - "arn:aws:iam::*:role/aws-service-role/rds.amazonaws.com/AWSServiceRoleForRDS" - ] - condition { - test = "StringEquals" - variable = "iam:AWSServiceName" - values = ["rds.amazonaws.com"] - } - } - - } @@ -200,13 +182,13 @@ data "aws_iam_policy_document" "service_linked_rds" { } } } - + resource "aws_iam_policy" "service_linked_rds" { name = "${aws_iam_user.cd.name}-service_linked_rds" description = "Allow Amazon RDS to call AWS services on behalf of your DB instances." policy = data.aws_iam_policy_document.service_linked_rds.json } - + resource "aws_iam_user_policy_attachment" "service_linked_rds" { user = aws_iam_user.cd.name policy_arn = aws_iam_policy.service_linked_rds.arn From 7e4a65fe7f93155a723dd1f3fb480dfd29e6bf05 Mon Sep 17 00:00:00 2001 From: Tian-T000 Date: Sun, 3 Aug 2025 00:13:03 +1000 Subject: [PATCH 14/15] add linked rds 15.4 --- infra/deploy/database.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infra/deploy/database.tf b/infra/deploy/database.tf index 17e8f6e..aa1f8f3 100644 --- a/infra/deploy/database.tf +++ b/infra/deploy/database.tf @@ -36,7 +36,7 @@ resource "aws_db_instance" "main" { allocated_storage = 20 storage_type = "gp2" engine = "postgres" - engine_version = "15.3" + engine_version = "15.4" auto_minor_version_upgrade = true instance_class = "db.t4g.micro" username = var.db_username From 35c977f424193d71eb6684ecd5844fb61155c1bc Mon Sep 17 00:00:00 2001 From: Tian-T000 Date: Sun, 3 Aug 2025 00:20:25 +1000 Subject: [PATCH 15/15] postres 15.7 --- infra/deploy/database.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infra/deploy/database.tf b/infra/deploy/database.tf index aa1f8f3..9c2088a 100644 --- a/infra/deploy/database.tf +++ b/infra/deploy/database.tf @@ -36,7 +36,7 @@ resource "aws_db_instance" "main" { allocated_storage = 20 storage_type = "gp2" engine = "postgres" - engine_version = "15.4" + engine_version = "15.7" auto_minor_version_upgrade = true instance_class = "db.t4g.micro" username = var.db_username