github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/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  ```hcl
    18  resource "triton_firewall_rule" "www" {
    19    rule    = "FROM any TO tag www ALLOW tcp (PORT 80 AND PORT 443)"
    20    enabled = true
    21  }
    22  ```
    23  
    24  ### Allow ssh traffic on port tcp/22 to all machines from known remote IPs
    25  
    26  ```hcl
    27  resource "triton_firewall_rule" "22" {
    28    rule    = "FROM IP (IP w.x.y.z OR IP w.x.y.z) TO all vms ALLOW tcp port 22"
    29    enabled = true
    30  }
    31  ```
    32  
    33  ### Block IMAP traffic on port tcp/143 to all machines
    34  
    35  ```hcl
    36  resource "triton_firewall_rule" "imap" {
    37    rule    = "FROM any TO all vms BLOCK tcp port 143"
    38    enabled = true
    39  }
    40  ```
    41  
    42  ## Argument Reference
    43  
    44  The following arguments are supported:
    45  
    46  * `rule` - (string, Required)
    47      The firewall rule described using the Cloud API rule syntax defined at https://docs.joyent.com/public-cloud/network/firewall/cloud-firewall-rules-reference.
    48  
    49  * `enabled` - (boolean)  Default: `false`
    50      Whether the rule should be effective.
    51  
    52  ## Attribute Reference
    53  
    54  The following attributes are exported:
    55  
    56  * `id` - (string) - The identifier representing the firewall rule in Triton.