From ea3e7da10e8faecc263341a7e225b7dc5cd2b16f Mon Sep 17 00:00:00 2001 From: "iacbot-demo[bot]" <82255952+iacbot-demo[bot]@users.noreply.github.com> Date: Fri, 11 Feb 2022 08:42:29 +0000 Subject: [PATCH] Lacework IaC Security fix --- terraform/aws/infrastructure.tf | 44 ++++++++++++++++----------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/terraform/aws/infrastructure.tf b/terraform/aws/infrastructure.tf index 84c5aa7..d4abc30 100644 --- a/terraform/aws/infrastructure.tf +++ b/terraform/aws/infrastructure.tf @@ -1,34 +1,34 @@ resource "aws_vpc" "main" { - tags = { - Name = "main" - } - cidr_block = var.vpc_cidr - enable_dns_hostnames = "true" + tags = { + Name = "main" + } + cidr_block = var.vpc_cidr + enable_dns_hostnames = "true" } /* Internet gateway for the public subnet */ resource "aws_internet_gateway" "gateway" { - vpc_id = aws_vpc.main.id - tags = { - Name = "main-gw" - } + vpc_id = aws_vpc.main.id + tags = { + Name = "main-gw" + } } resource "aws_subnet" "public" { - vpc_id = aws_vpc.main.id - cidr_block = var.vpc_public_subnet - map_public_ip_on_launch = "true" - depends_on = [aws_internet_gateway.gateway] - tags = { - Name = "Public Subnet" - } + vpc_id = aws_vpc.main.id + cidr_block = var.vpc_public_subnet + map_public_ip_on_launch = false + depends_on = [aws_internet_gateway.gateway] + tags = { + Name = "Public Subnet" + } } resource "aws_subnet" "private" { - vpc_id = aws_vpc.main.id - cidr_block = var.vpc_private_subnet - map_public_ip_on_launch = false - tags = { - Name = "Private Subnet" - } + vpc_id = aws_vpc.main.id + cidr_block = var.vpc_private_subnet + map_public_ip_on_launch = false + tags = { + Name = "Private Subnet" + } }