From 0d5dac3ad0c73956855ac46f1aa99147e47336eb Mon Sep 17 00:00:00 2001 From: Sourav Kundu Date: Tue, 19 Nov 2024 06:02:06 -0600 Subject: [PATCH] corrected ec2 subnet #45 --- ec2.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ec2.tf b/ec2.tf index 380feda..7f21eb4 100644 --- a/ec2.tf +++ b/ec2.tf @@ -48,7 +48,7 @@ resource "aws_instance" "app-server-read" { iam_instance_profile = aws_iam_instance_profile.ec2_profile.name associate_public_ip_address = true #checkov:skip=CKV_AWS_88: Required for Session Manager access - subnet_id = module.vpc.private_subnets[0].id + subnet_id = module.vpc.public_subnets[0].id ebs_optimized = true monitoring = true root_block_device { @@ -77,7 +77,7 @@ resource "aws_instance" "app-server-write" { iam_instance_profile = aws_iam_instance_profile.ec2_profile.name associate_public_ip_address = true #checkov:skip=CKV_AWS_88: Required for Session Manager access - subnet_id = module.vpc.private_subnets[0].id + subnet_id = module.vpc.public_subnets[0].id ebs_optimized = true monitoring = true root_block_device {