Terraform AWS Network Firewall
AWS Network Firewall rule groups, firewall policies, firewalls, logging destinations, stateless and stateful inspection rules, and subnet placement for traffic filtering.
Quick start
module "network-firewall" {
source = "nis2.compliance.tf/terraform-aws-modules/network-firewall/aws"
version = "~> 2.3"
# ... your arguments here
}module "network-firewall" {
source = "nistcsf.compliance.tf/terraform-aws-modules/network-firewall/aws"
version = "~> 2.3"
# ... your arguments here
}module "network-firewall" {
source = "pcidss.compliance.tf/terraform-aws-modules/network-firewall/aws"
version = "~> 2.3"
# ... your arguments here
}module "network-firewall" {
source = "iso27001.compliance.tf/terraform-aws-modules/network-firewall/aws"
version = "~> 2.3"
# ... your arguments here
}module "network-firewall" {
source = "soc2.compliance.tf/terraform-aws-modules/network-firewall/aws"
version = "~> 2.3"
# ... your arguments here
}This module on the compliance.tf registry lists its versions, inputs and outputs. The Get Started guide and Registry Endpoints cover authentication and how to customize the module for your requirements.
Migration from upstream
Already using terraform-aws-modules? Change only the source URL:
module "network-firewall" {
source = "terraform-aws-modules/network-firewall/aws"
version = "~> 2.3"
}module "network-firewall" {
source = "soc2.compliance.tf/terraform-aws-modules/network-firewall/aws"
version = "~> 2.3"
}Same arguments. Same outputs. Controls are checked at terraform plan. The Migration Guide has the step-by-step version.
Reversibility
No lock-in. Switch back by reverting the source URL:
module "network-firewall" {
source = "terraform-aws-modules/network-firewall/aws"
}Run terraform init -upgrade. Terraform state is unchanged: same resource addresses, same provider, no compliance.tf-specific resources. Controls you already applied remain in AWS.
Controls enforced
Up to 4 controls are checked at terraform plan when this module comes from a compliance.tf endpoint. Which ones are active depends on the endpoint; see Framework coverage.
Mapped compliance frameworks
| Clause | Controls from this module |
|---|---|
| 6 Security in network and information systems acquisition, development and maintenance |
| Clause | Controls from this module |
|---|---|
| PR.IR-01 |
| Clause | Controls from this module |
|---|---|
| 1.2.6: Network security controls (NSCs) are configured and maintained. | |
| 1.2.8: Network security controls (NSCs) are configured and maintained. | |
| 1.3.1: Network access to and from the cardholder data environment is restricted. | |
| 1.3.2: Network access to and from the cardholder data environment is restricted. | |
| 1.4.2: Network connections between trusted and untrusted networks are controlled. | |
| 1.4.3 Anti-spoofing measures are implemented to detect and block forged source IP addresses from entering the trusted network | |
| 1.5.1 Security controls are implemented on any computing devices, including company- and employee-owned devices, that connect to both untrusted networks | |
| A1.1.2: Multi-tenant service providers protect and separate all customer environments and data. |
| Clause | Controls from this module |
|---|---|
| A.8.32 Change management |
| Clause | Controls from this module |
|---|---|
| CC8.1 The entity authorizes, designs, develops or acquires, configures, documents, tests, approves, and implements changes to infrastructure, data, software, and procedures to meet its objectives |
Framework coverage
Which controls from this module are active under each framework endpoint. Your framework preferences choose the columns.
| Control | PCI DSS v4.0 | SOC 2 |
|---|---|---|
| Network Firewall firewalls should have deletion protection enabled | Not active | Not active |
| Network Firewall policies should have default stateless action set to drop or forward for fragmented packets | Enforced | Not active |
| Network Firewall policies should have default stateless action set to drop or forward for full packets | Enforced | Not active |
| Network Firewall firewalls should have subnet change protection enabled | Not active | Enforced |