FEATURES OPEN SOURCE ABOUT DOCS LOGIN REGISTER

aws_network_acl

Provides an network ACL resource. You might set up network ACLs with rules similar to your security groups in order to add an additional layer of security to your VPC.

Example Usage

resource "aws_network_acl" "main" {
	vpc_id = "${aws_vpc.main.id}"
	egress {
		protocol = "tcp"
		rule_no = 2
		action = "allow"
		cidr_block =  "10.3.0.0/18"
		from_port = 443
		to_port = 443
	}

	ingress {
		protocol = "tcp"
		rule_no = 1
		action = "allow"
		cidr_block =  "10.3.0.0/18"
		from_port = 80
		to_port = 80
	}

	tags {
		Name = "main"
	}
}

Argument Reference

The following arguments are supported:

Both egress and ingress support the following keys:

~> Note: For more information on ICMP types and codes, see here: http://www.nthelp.com/icmp.html

Attributes Reference

The following attributes are exported:

Import

Network ACLs can be imported using the id, e.g.

$ terraform import aws_network_acl.main acl-7aaabd18

See the source of this document at Terraform.io