github.com/nalum/terraform@v0.3.2-0.20141223102918-aa2c22ffeff6/website/source/docs/providers/cloudstack/r/network_acl_rule.html.markdown (about) 1 --- 2 layout: "cloudstack" 3 page_title: "CloudStack: cloudstack_network_acl_rule" 4 sidebar_current: "docs-cloudstack-resource-network_acl_rule" 5 description: |- 6 Creates network ACL rules for a given network ACL. 7 --- 8 9 # cloudstack\_network\_acl\_rule 10 11 Creates network ACL rules for a given network ACL. 12 13 ## Example Usage 14 15 ``` 16 resource "cloudstack_network_acl_rule" "default" { 17 aclid = "f3843ce0-334c-4586-bbd3-0c2e2bc946c6" 18 19 rule { 20 action = "allow" 21 source_cidr = "10.0.0.0/8" 22 protocol = "tcp" 23 ports = ["80", "1000-2000"] 24 traffic_type = "ingress" 25 } 26 } 27 ``` 28 29 ## Argument Reference 30 31 The following arguments are supported: 32 33 * `aclid` - (Required) The network ACL ID for which to create the rules. 34 Changing this forces a new resource to be created. 35 36 * `rule` - (Required) Can be specified multiple times. Each rule block supports 37 fields documented below. 38 39 The `rule` block supports: 40 41 * `action` - (Optional) The action for the rule. Valid options are: `allow` and 42 `deny` (defaults allow). 43 44 * `source_cidr` - (Required) The source cidr to allow access to the given ports. 45 46 * `protocol` - (Required) The name of the protocol to allow. Valid options are: 47 `tcp`, `udp`, `icmp`, `all` or a valid protocol number. 48 49 * `icmp_type` - (Optional) The ICMP type to allow. This can only be specified if 50 the protocol is ICMP. 51 52 * `icmp_code` - (Optional) The ICMP code to allow. This can only be specified if 53 the protocol is ICMP. 54 55 * `ports` - (Optional) List of ports and/or port ranges to allow. This can only 56 be specified if the protocol is TCP, UDP, ALL or a valid protocol number. 57 58 * `traffic_type` - (Optional) The traffic type for the rule. Valid options are: 59 `ingress` or `egress` (defaults ingress). 60 61 ## Attributes Reference 62 63 The following attributes are exported: 64 65 * `aclid` - The ACL ID for which the rules are created.