From b79009b3e154c5825848bbbffd32a4186aea03d7 Mon Sep 17 00:00:00 2001 From: Gianmarco Ciaffardini Date: Sat, 1 Oct 2022 17:08:43 +0200 Subject: [PATCH] chore: final try --- .aws/production/task-definition.json | 7 ++++--- infrastructure/modules/vpc/ main.tf | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/.aws/production/task-definition.json b/.aws/production/task-definition.json index 3c0c7da..94d1914 100644 --- a/.aws/production/task-definition.json +++ b/.aws/production/task-definition.json @@ -6,10 +6,11 @@ "dnsSearchDomains": null, "logConfiguration": null, "entryPoint": null, - "environment": [ + "environment": [], + "environmentFiles": [ { - "name": "PORT", - "value": "4000" + "value": "arn:aws:s3:::elephant-production-bucket/.production.env", + "type": "s3" } ], "portMappings": [ diff --git a/infrastructure/modules/vpc/ main.tf b/infrastructure/modules/vpc/ main.tf index 55a94ed..421d2a4 100644 --- a/infrastructure/modules/vpc/ main.tf +++ b/infrastructure/modules/vpc/ main.tf @@ -93,3 +93,28 @@ resource "aws_route_table_association" "public_subnet_2-route-table-association" route_table_id = aws_route_table.public_route_table.id } + +# PRIVATE + +resource "aws_route_table" "private_route_table" { + vpc_id = aws_vpc.main.id + tags = { + "Name" = "${local.name}-pvt-route-table" + } +} + +resource "aws_route" "private_route" { + route_table_id = "${aws_route_table.private_route_table.id}" + destination_cidr_block = "0.0.0.0/0" + gateway_id = aws_internet_gateway.internet_gateway.id +} + +resource "aws_route_table_association" "private_subnet_1-route-table-association" { + subnet_id = aws_subnet.private_subnet_1.id + route_table_id = aws_route_table.private_route_table.id +} + +resource "aws_route_table_association" "private_subnet_2-route-table-association" { + subnet_id = aws_subnet.private_subnet_2.id + route_table_id = aws_route_table.private_route_table.id +}