From: Cássio Gabriel Date: Sat, 24 Jan 2026 16:16:21 +0000 (-0300) Subject: Add Security Group settings X-Git-Tag: v1.0.0~7 X-Git-Url: http://ec2-54-166-230-229.compute-1.amazonaws.com/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df1b29e4747eb43717c2a12983812d3b64145f6f;p=cloud-security-assessment.git Add Security Group settings --- diff --git a/assessment/terraform/main.tf b/assessment/terraform/main.tf index 16ad0ea..6116451 100644 --- a/assessment/terraform/main.tf +++ b/assessment/terraform/main.tf @@ -102,3 +102,25 @@ resource "aws_route_table_association" "private" { route_table_id = aws_route_table.private.id } +# ------------------------------------------------------- + +# Security group for the Wahzuh instance +resource "aws_security_group" "wazuh_ec2" { + name = "wazuh-ec2-sg" + description = "Minimal access security group for Wazuh EC2" + vpc_id = aws_vpc.this.id + + tags = { + Name = "wazuh-ec2-sg" + } +} + +# Inbound rules for the Wahzuh security group +resource "aws_security_group" "egress_all" { + type = "egress" + security_group_id = aws_security_group.wazuh_ec2.id + from_port = 0 + to_port = 0 + protocol = "-1" # All protocols + cidr_blocks = ["0.0.0.0/0"] +}