DEV Community

Miracle Olorunsola
Miracle Olorunsola

Posted on

Building Secure AWS Networking with Terraform

Step 1: Create Security Group

resource "aws_security_group" "db_sg" {
  ingress {
    from_port   = 3306
    to_port     = 3306
    protocol    = "tcp"
    security_groups = [aws_security_group.app_sg.id]
  }
}

Enter fullscreen mode Exit fullscreen mode

Lesson

Security should be code-reviewed, not manually configured.

Top comments (0)