/terraform-aws-firewall-rules

Terraform module for creating AWS Network Firewall rules

Primary LanguageHCLGNU General Public License v3.0GPL-3.0

Github Actions

Terraform AWS Firewall Rules

Description

This module is responsible for creating AWS Network Stateful Firewall Rules. Provided a given set of rule files in Suricata format, this module will parse and validate those rules, providing feedback on validation errors at plan and apply time.

Usage

Add example usage here

module "example" {
  source  = "appvia/firewall-rules/aws"
  version = "1.0.0"

  name     = "stateful-test"
  ordering = "STRICT_ORDER"

  rule_files = [
    "${path.root}/rules/default.rules",
  ]

  ip_variables = {
    HOME_NET = [
      "10.0.0.0/8",
    ]

    EXTERNAL_NET = [
      "0.0.0.0/0",
    ]
  }
}

Update Documentation

The terraform-docs utility is used to generate this README. Follow the below steps to update:

  1. Make changes to the .terraform-docs.yml file
  2. Fetch the terraform-docs binary (https://terraform-docs.io/user-guide/installation/)
  3. Run terraform-docs markdown table --output-file ${PWD}/README.md --output-mode inject .

Requirements

Name Version
terraform >= 1.0.7
aws >= 5.0.0

Providers

Name Version
aws >= 5.0.0

Modules

Name Source Version
parser ./modules/rules_parser n/a

Resources

Name Type
aws_networkfirewall_rule_group.this resource

Inputs

Name Description Type Default Required
name Name of the AWS network firewall rule group string n/a yes
rule_files List of rule files to load into the rule group list(string) n/a yes
capacity Capacity defining the maximum number of rules within the rule group number 50 no
ip_references Map consisting of string keys and values denoting IP prefix list variable definitions map(string) {} no
ip_variables Map consisting of string keys with string list values denoting IP variable definitions map(list(string)) {} no
ordering Specifies the type of ordering when evaluating rules within the group string "DEFAULT_ACTION_ORDER" no
port_variables Map consisting of string keys with string list values denoting port variable definitions map(list(string)) {} no
tags Tags to be applied to resources created by this module map(string) {} no

Outputs

Name Description
arn ARN of the AWS network firewall rule group
rules List of applied rules within the network firewall rule group