Rammina / terraform-webserver-cluster-aws-waf-nacl

Terraform config that allows you to quickly set up AWS WAF rules that identify and block common DDoS request patterns to effectively mitigate a DDoS attack on your web app's cloud infrastructure. It also comes with a Network Access Control List (ACL) to only allow the required ports and network addresses in the VPC.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Terraform Web Server Cluster with AWS Firewall Web ACL & NACL

This Terraform config sets up a VPC, public subnets, ALB, ASG, and other networking components along with security measures like WAF and NACLs to deploy and securely host a web application. The key resources it creates are the ALB, ASG, WAF ACL, and associated components to deploy and scale the web servers.

Purpose

It allows you to quickly set up AWS WAF rules that identify and block common DDoS request patterns to effectively mitigate a DDoS attack on your web app's cloud infrastructure. It also comes with a Network Access Control List (ACL) to only allow the required ports and network addresses in the VPC.

Feel free to update the user data script for the ASG Launch Template based on your use cases.

Prerequisites

Installation

  1. Install Terraform, if you don't already have it.

  2. Configure your AWS access keys in your AWS CLI, if you haven't yet:

    aws configure
  3. Clone this repository:

    git clone https://github.com/Rammina/terraform-webserver-cluster-aws-waf-nacl.git
  4. Navigate into the repository directory:

    cd terraform-webserver-cluster-aws-waf-nacl

Usage

  1. Install the plugins and modules needed for the configuration:

    terraform init
  2. Check for syntax errors and missing variables/resources:

    terraform validate
  3. Show the infrastructure changes to be made if the configuration is applied:

    terraform plan
  4. Customize the setup by modifying the project files as needed. Feel free to update it according your needs.

  5. Apply the changes to deploy the infrastructure - this provisions the resources specified in the configuration:

    terraform apply
  6. When you are finished with the infrastructure and no longer need it, you can destroy it:

    terraform destroy

    This removes all provisioned infrastructure resources.

  7. In between terraform apply and terraform destroy, you can modify Terraform files as needed and rerun steps 2-4 to incrementally update your infrastructure.

About

Terraform config that allows you to quickly set up AWS WAF rules that identify and block common DDoS request patterns to effectively mitigate a DDoS attack on your web app's cloud infrastructure. It also comes with a Network Access Control List (ACL) to only allow the required ports and network addresses in the VPC.

License:MIT License


Languages

Language:HCL 97.2%Language:Shell 2.8%