github.com/chalford/terraform@v0.3.7-0.20150113080010-a78c69a8c81f/website/source/docs/providers/aws/r/network_acl.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_network_acl"
     4  sidebar_current: "docs-aws-resource-network-acl"
     5  description: |-
     6    Provides an network ACL resource.
     7  ---
     8  
     9  # aws\_network\_acl
    10  
    11  Provides an network ACL resource. You might set up network ACLs with rules similar
    12  to your security groups in order to add an additional layer of security to your VPC.
    13  
    14  ## Example Usage
    15  
    16  ```
    17  resource "aws_network_acl" "main" {
    18  	vpc_id = "${aws_vpc.main.id}"
    19  	egress = {
    20  		protocol = "tcp"
    21  		rule_no = 2
    22  		action = "allow"
    23  		cidr_block =  "10.3.2.3/18"
    24  		from_port = 443
    25  		to_port = 443
    26  	}
    27  
    28  	ingress = {
    29  		protocol = "tcp"
    30  		rule_no = 1
    31  		action = "allow"
    32  		cidr_block =  "10.3.10.3/18"
    33  		from_port = 80
    34  		to_port = 80
    35  	}
    36  }
    37  ```
    38  
    39  ## Argument Reference
    40  
    41  The following arguments are supported:
    42  
    43  * `vpc_id` - (Required) The ID of the associated VPC.
    44  * `subnet_id` - (Optional) The ID of the associated subnet.
    45  * `ingress` - (Optional) Specifies an ingress rule. Parameters defined below.
    46  * `egress` - (Optional) Specifies an egress rule. Parameters defined below.
    47  
    48  Both `egress` and `ingress` support the following keys:
    49  
    50  * `from_port` - (Required) The from port to match.
    51  * `to_port` - (Required) The to port to match.
    52  * `rule_no` - (Required) The rule number. Used for ordering.
    53  * `action` - (Required) The action to take.
    54  * `protocol` - (Required) The protocol to match.
    55  * `cidr_block` - (Optional) The CIDR block to match.
    56  
    57  ## Attributes Reference
    58  
    59  The following attributes are exported:
    60  
    61  * `id` - The ID of the network ACL
    62