github.com/erriapo/terraform@v0.6.12-0.20160203182612-0340ea72354f/website/source/docs/providers/cloudstack/r/firewall.html.markdown (about)

     1  ---
     2  layout: "cloudstack"
     3  page_title: "CloudStack: cloudstack_firewall"
     4  sidebar_current: "docs-cloudstack-resource-firewall"
     5  description: |-
     6    Creates firewall rules for a given IP address.
     7  ---
     8  
     9  # cloudstack\_firewall
    10  
    11  Creates firewall rules for a given IP address.
    12  
    13  ## Example Usage
    14  
    15  ```
    16  resource "cloudstack_firewall" "default" {
    17    ipaddress = "192.168.0.1"
    18  
    19    rule {
    20      cidr_list = ["10.0.0.0/8"]
    21      protocol = "tcp"
    22      ports = ["80", "1000-2000"]
    23    }
    24  }
    25  ```
    26  
    27  ## Argument Reference
    28  
    29  The following arguments are supported:
    30  
    31  * `ipaddress` - (Required) The IP address or ID for which to create the firewall
    32      rules. Changing this forces a new resource to be created.
    33  
    34  * `managed` - (Optional) USE WITH CAUTION! If enabled all the firewall rules for
    35      this IP address will be managed by this resource. This means it will delete
    36      all firewall rules that are not in your config! (defaults false)
    37  
    38  * `rule` - (Optional) Can be specified multiple times. Each rule block supports
    39      fields documented below. If `managed = false` at least one rule is required!
    40  
    41  * `parallelism` (Optional) Specifies how much rules will be created or deleted
    42      concurrently. (defaults 2)
    43      
    44  The `rule` block supports:
    45  
    46  * `cidr_list` - (Required) A CIDR list to allow access to the given ports.
    47  
    48  * `source_cidr` - (Optional, Deprecated) The source CIDR to allow access to the
    49      given ports. This attribute is deprecated, please use `cidr_list` instead.
    50  
    51  * `protocol` - (Required) The name of the protocol to allow. Valid options are:
    52      `tcp`, `udp` and `icmp`.
    53  
    54  * `icmp_type` - (Optional) The ICMP type to allow. This can only be specified if
    55      the protocol is ICMP.
    56  
    57  * `icmp_code` - (Optional) The ICMP code to allow. This can only be specified if
    58      the protocol is ICMP.
    59  
    60  * `ports` - (Optional) List of ports and/or port ranges to allow. This can only
    61      be specified if the protocol is TCP or UDP.
    62  
    63  ## Attributes Reference
    64  
    65  The following attributes are exported:
    66  
    67  * `id` - The IP address ID for which the firewall rules are created.