github.com/andresvia/terraform@v0.6.15-0.20160412045437-d51c75946785/website/source/docs/providers/aws/r/network_acl_rule.html.markdown (about) 1 --- 2 layout: "aws" 3 page_title: "AWS: aws_network_acl_rule" 4 sidebar_current: "docs-aws-resource-network-acl-rule" 5 description: |- 6 Provides an network ACL Rule resource. 7 --- 8 9 # aws\_network\_acl\_rule 10 11 Creates an entry (a rule) in a network ACL with the specified rule number. 12 13 ## Example Usage 14 15 ``` 16 resource "aws_network_acl" "bar" { 17 vpc_id = "${aws_vpc.foo.id}" 18 } 19 resource "aws_network_acl_rule" "bar" { 20 network_acl_id = "${aws_network_acl.bar.id}" 21 rule_number = 200 22 egress = false 23 protocol = "tcp" 24 rule_action = "allow" 25 cidr_block = "0.0.0.0/0" 26 from_port = 22 27 to_port = 22 28 } 29 ``` 30 31 ## Argument Reference 32 33 The following arguments are supported: 34 35 * `network_acl_id` - (Required) The ID of the network ACL. 36 * `rule_number` - (Required) The rule number for the entry (for example, 100). ACL entries are processed in ascending order by rule number. 37 * `egress` - (Optional, bool) Indicates whether this is an egress rule (rule is applied to traffic leaving the subnet). Default `false`. 38 * `protocol` - (Required) The protocol. A value of -1 means all protocols. 39 * `rule_action` - (Required) Indicates whether to allow or deny the traffic that matches the rule. Accepted values: `allow` | `deny` 40 * `cidr_block` - (Required) The network range to allow or deny, in CIDR notation (for example 172.16.0.0/24 ). 41 * `from_port` - (Optional) The from port to match. 42 * `to_port` - (Optional) The to port to match. 43 * `icmp_type` - (Optional) ICMP protocol: The ICMP type. Required if specifying ICMP for the protocol. e.g. -1 44 * `icmp_code` - (Optional) ICMP protocol: The ICMP code. Required if specifying ICMP for the protocol. e.g. -1 45 46 ~> Note: For more information on ICMP types and codes, see here: http://www.nthelp.com/icmp.html 47 48 ## Attributes Reference 49 50 The following attributes are exported: 51 52 * `id` - The ID of the network ACL Rule 53