AWSLive-testedreceipt

Network ACLs with the Return Rules They Need

Network ACLs are stateless, which is why most of them do not work: the reply to an allowed outbound connection is a new inbound packet nothing lets in. This generates the matching ephemeral-range rule for every TCP and UDP allow.

terraformAWSaws
aws-network-aclvizier v1.2.0

Verification

Live-tested

Really deployed to a cloud sandbox, verified against its outputs and assertions, then destroyed - with the teardown confirmed.

Conformance

  • Static validation (fmt · validate · tflint)
  • Security scan clean (Checkov)
  • Plan test superseded by live test

Provenance

  • SHA-256 checksum
  • Signature (pending)

Functional

  • Live-tested on registry.opentofu.org/hashicorp/aws - applied, verified, destroyed

Last verified 2026-10-31 · tofu 1.12.1 · how we verify

Use it from the registry

terraform · opentofu
module "network_acl" {
  source  = "www.iac-bazaar.com/iac-bazaar/aws-network-acl/aws"
  version = "1.0.0"
}

Needs a registry token from /account/tokens. The module itself is free; the account is what identifies you. Full setup: registry docs.

Cite it in your README

badge · attribution

Paste this beside the module in the repository that uses it. The badge is rendered from this artifact's verification record, so it reads live-tested because the record says so, and the link lands on this page.

README.md, GitLab, Gitea
[![IaC Bazaar: live-tested](https://www.iac-bazaar.com/api/artifacts/aws-network-acl/badge)](https://www.iac-bazaar.com/catalog/aws-network-acl?utm_source=syndication&utm_medium=readme&utm_campaign=artifact)

Terraform module 1.0.0, live-tested on IaC Bazaar: [Network ACLs with the Return Rules They Need](https://www.iac-bazaar.com/catalog/aws-network-acl?utm_source=syndication&utm_medium=readme&utm_campaign=artifact)

```hcl
module "network_acl" {
  source  = "www.iac-bazaar.com/iac-bazaar/aws-network-acl/aws"
  version = "1.0.0"
}
```

Preview:IaC Bazaar: live-tested

Inputs & outputs

Create a free account to read this module's contract

The declared contract - every input name, type, default and description, plus every output - is shown to signed-in accounts, not to anonymous visitors.

A free account sees the contract of every module in the catalogue. There is no subscription and nothing to buy - the modules are free to download, and they run under Vizier.

Documentation

aws-network-acl

A network ACL, its rules, and the return-traffic rules a stateless filter needs. Works with Terraform and OpenTofu (>= 1.6), AWS provider >= 6.0, < 7.0.

Network ACLs are stateless, and that is the cause of essentially every one that "does not work". The reply to an allowed outbound connection is a new inbound packet - from the destination's port, to an ephemeral port on the client - and nothing lets it in unless a rule says so. Allow 443 outbound, forget ports 1024-65535 inbound, and the handshake completes in one direction and nothing ever comes back.

So this module generates the matching return rule for every TCP and UDP allow rule: opposite direction, ephemeral range, same peer, at number + return_rule_offset. return_traffic = false turns it off where you mean strictly one-way, and denies and ICMP never get one. The generated_return_rules output lists them by name - if it is empty and you expected replies, nothing is letting them back in.

Attaching a custom ACL to a subnet is an instant outage if the rules are not there yet. A custom ACL denies everything until told otherwise, unlike the default one which allows everything. The subnet associations are their own resource and depends_on the rules, so within a single apply the ACL is populated before any subnet moves onto it.

Other things the module refuses rather than lets you discover:

  • Two rules at the same number in the same direction - AWS keeps whichever was written last, and the plan shows no conflict at all
  • A rule number of 32767, which is the implicit deny
  • A rule with both or neither of cidr_block and ipv6_cidr_block
  • A TCP or UDP rule with no ports

Rules are evaluated lowest number first and first match wins, so a broad allow at 100 makes a narrow deny at 200 unreachable. The example leaves gaps of 100 for that reason.

Verification

Static validation runs tofu fmt, init, validate, tflint and checkov. This module has not yet had a live test, so it is published as statically validated with its live test pending and does not carry the live-tested mark.

Usage code & full reference need an account

The complete copy-paste usage, the full input/output reference, and operational notes are free with an account - shown here and bundled in the download. Sign in and this section fills in.

  • One suppressed policy, and why
  • Usage

Related modules

Static validatedLive test pending

aws-vpc-lattice

auth_type defaults to NONE, so any client in any associated VPC can call any service with no identity and no policy - and associating one more VPC silently grants everything in it. Defaults to AWS_IAM and requires per-VPC security groups.

View module
Live-tested

aws-vpc-peering

A VPC peering between two VPCs in one account and region, accepted in the same apply, with DNS resolution across it and routes written in every listed route table on both sides for every CIDR of the other. A default route through a peering is refused (CKV2_AWS_44). Peering is not transitive; past a handful of VPCs the transit gateway is the product.

View module
Static validatedLive test pending

aws-client-vpn

Remote-access VPN endpoint with certificate or SAML authentication, split tunnelling, per-group authorization rules and connection logging. There is no allow-all shortcut: an endpoint with no rule reaches nothing.

View module
Live-tested

aws-cloud-map

Private DNS, public DNS or API-only namespaces and the services registered in them. Documents the health-check trap: a private namespace gets a custom check that something else must update, and one nobody updates reports healthy forever.

View module
Static validatedLive test pending

aws-cloud-wan

A global network whose segments, routing and attachment placement live in one policy document rather than per-region route tables. The policy VERSION is executed as a second step, so a change cannot report success while the network still runs the previous one.

View module
Static validatedLive test pending

aws-direct-connect

Gateway, connections, virtual interfaces and associations. A private circuit is a private path, not a private conversation: traffic crosses it in clear text unless MACsec is on, and should_encrypt quietly falls back to clear text.

View module