github.com/cbroglie/terraform@v0.7.0-rc3.0.20170410193827-735dfc416d46/website/source/docs/providers/triton/r/triton_firewall_rule.html.markdown (about)

     1  ---
     2  layout: "triton"
     3  page_title: "Triton: triton_firewall_rule"
     4  sidebar_current: "docs-triton-resource-firewall-rule"
     5  description: |-
     6      The `triton_firewall_rule` resource represents a rule for the Triton cloud firewall.
     7  ---
     8  
     9  # triton\_firewall\_rule
    10  
    11  The `triton_firewall_rule` resource represents a rule for the Triton cloud firewall.
    12  
    13  ## Example Usages
    14  
    15  ### Allow web traffic on ports tcp/80 and tcp/443 to machines with the 'www' tag from any source
    16  
    17  
    18  ```
    19  resource "triton_firewall_rule" "www" {
    20    rule    = "FROM any TO tag www ALLOW tcp (PORT 80 AND PORT 443)"
    21    enabled = true
    22  }
    23  ```
    24  
    25  
    26  ### Allow ssh traffic on port tcp/22 to all machines from known remote IPs
    27  
    28  
    29  ```
    30  resource "triton_firewall_rule" "22" {
    31    rule    = "FROM IP (IP w.x.y.z OR IP w.x.y.z) TO all vms ALLOW tcp port 22"
    32    enabled = true
    33  }
    34  ```
    35  
    36  
    37  
    38  ### Block IMAP traffic on port tcp/143 to all machines
    39  
    40  ```
    41  resource "triton_firewall_rule" "imap" {
    42    rule    = "FROM any TO all vms BLOCK tcp port 143"
    43    enabled = true
    44  }
    45  ```
    46  
    47  
    48  
    49  ## Argument Reference
    50  
    51  The following arguments are supported:
    52  
    53  * `rule` - (string, Required)
    54      The firewall rule described using the Cloud API rule syntax defined at https://docs.joyent.com/public-cloud/network/firewall/cloud-firewall-rules-reference.
    55  
    56  * `enabled` - (boolean)  Default: `false`
    57      Whether the rule should be effective.
    58  
    59  ## Attribute Reference
    60  
    61  The following attributes are exported:
    62  
    63  * `id` - (string) - The identifier representing the firewall rule in Triton.