From dec7d553db4beba8894d2032572e0d17cd9e2929 Mon Sep 17 00:00:00 2001 From: Ibrahim Date: Thu, 18 Jul 2024 12:00:08 +0300 Subject: [PATCH] vpc.tf --- terraform/vpc.tf | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/terraform/vpc.tf b/terraform/vpc.tf index f7b1e8f..f14dfec 100755 --- a/terraform/vpc.tf +++ b/terraform/vpc.tf @@ -43,29 +43,21 @@ resource "aws_route_table_association" "rt-association" { resource "aws_security_group" "security-group" { vpc_id = aws_vpc.vpc.id - description = "Allowing Jenkins, Sonarqube, SSH Access" - - ingress = [ - for port in [22, 8080, 9000, 9090, 80] : { - description = "TLS from VPC" - from_port = port - to_port = port - protocol = "tcp" - ipv6_cidr_blocks = ["::/0"] - self = false - prefix_list_ids = [] - security_groups = [] - cidr_blocks = ["0.0.0.0/0"] - } - ] + description = "Allowing SSH Access" + ingress { + from_port = 22 #SSH + to_port = 22 + protocol = "tcp" + cidr_blocks = ["0.0.0.0/0"] + } egress { from_port = 0 to_port = 0 protocol = "-1" cidr_blocks = ["0.0.0.0/0"] } - + tags = { Name = var.sg-name }