github.com/atsaki/terraform@v0.4.3-0.20150919165407-25bba5967654/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 * `managed` - (Optional) USE WITH CAUTION! If enabled all the firewall rules for 37 this network ACL will be managed by this resource. This means it will delete 38 all firewall rules that are not in your config! (defaults false) 39 40 * `rule` - (Optional) Can be specified multiple times. Each rule block supports 41 fields documented below. If `managed = false` at least one rule is required! 42 43 The `rule` block supports: 44 45 * `action` - (Optional) The action for the rule. Valid options are: `allow` and 46 `deny` (defaults allow). 47 48 * `source_cidr` - (Required) The source CIDR to allow access to the given ports. 49 50 * `protocol` - (Required) The name of the protocol to allow. Valid options are: 51 `tcp`, `udp`, `icmp`, `all` or a valid protocol number. 52 53 * `icmp_type` - (Optional) The ICMP type to allow. This can only be specified if 54 the protocol is ICMP. 55 56 * `icmp_code` - (Optional) The ICMP code to allow. This can only be specified if 57 the protocol is ICMP. 58 59 * `ports` - (Optional) List of ports and/or port ranges to allow. This can only 60 be specified if the protocol is TCP, UDP, ALL or a valid protocol number. 61 62 * `traffic_type` - (Optional) The traffic type for the rule. Valid options are: 63 `ingress` or `egress` (defaults ingress). 64 65 ## Attributes Reference 66 67 The following attributes are exported: 68 69 * `id` - The ACL ID for which the rules are created.