github.com/minamijoyo/terraform@v0.7.8-0.20161029001309-18b3736ba44b/website/source/docs/providers/openstack/r/fw_firewall_v1.html.markdown (about)

     1  ---
     2  layout: "openstack"
     3  page_title: "OpenStack: openstack_fw_firewall_v1"
     4  sidebar_current: "docs-openstack-resource-fw-firewall-v1"
     5  description: |-
     6    Manages a v1 firewall resource within OpenStack.
     7  ---
     8  
     9  # openstack\_fw\_firewall_v1
    10  
    11  Manages a v1 firewall resource within OpenStack.
    12  
    13  ## Example Usage
    14  
    15  ```
    16  resource "openstack_fw_rule_v1" "rule_1" {
    17    name = "my-rule-1"
    18    description = "drop TELNET traffic"
    19    action = "deny"
    20    protocol = "tcp"
    21    destination_port = "23"
    22    enabled = "true"
    23  }
    24  
    25  resource "openstack_fw_rule_v1" "rule_2" {
    26    name = "my-rule-2"
    27    description = "drop NTP traffic"
    28    action = "deny"
    29    protocol = "udp"
    30    destination_port = "123"
    31    enabled = "false"
    32  }
    33  
    34  resource "openstack_fw_policy_v1" "policy_1" {
    35    name = "my-policy"
    36    rules = ["${openstack_fw_rule_v1.rule_1.id}",
    37             "${openstack_fw_rule_v1.rule_2.id}"]
    38  }
    39  
    40  resource "openstack_fw_firewall_v1" "firewall_1" {
    41    name = "my-firewall"
    42    policy_id = "${openstack_fw_policy_v1.policy_1.id}"
    43  }
    44  ```
    45  
    46  ## Argument Reference
    47  
    48  The following arguments are supported:
    49  
    50  * `region` - (Required) The region in which to obtain the v1 networking client.
    51      A networking client is needed to create a firewall. If omitted, the
    52      `OS_REGION_NAME` environment variable is used. Changing this creates a new
    53      firewall.
    54  
    55  * `policy_id` - (Required) The policy resource id for the firewall. Changing
    56      this updates the `policy_id` of an existing firewall.
    57  
    58  * `name` - (Optional) A name for the firewall. Changing this
    59      updates the `name` of an existing firewall.
    60  
    61  * `description` - (Required) A description for the firewall. Changing this
    62      updates the `description` of an existing firewall.
    63  
    64  * `admin_state_up` - (Optional) Administrative up/down status for the firewall
    65      (must be "true" or "false" if provided - defaults to "true").
    66      Changing this updates the `admin_state_up` of an existing firewall.
    67  
    68  * `tenant_id` - (Optional) The owner of the floating IP. Required if admin wants
    69      to create a firewall for another tenant. Changing this creates a new
    70      firewall.
    71  
    72  ## Attributes Reference
    73  
    74  The following attributes are exported:
    75  
    76  * `region` - See Argument Reference above.
    77  * `policy_id` - See Argument Reference above.
    78  * `name` - See Argument Reference above.
    79  * `description` - See Argument Reference above.
    80  * `admin_state_up` - See Argument Reference above.
    81  * `tenant_id` - See Argument Reference above.
    82  
    83  ## Import
    84  
    85  Firewalls can be imported using the `id`, e.g.
    86  
    87  ```
    88  $ terraform import openstack_fw_firewall_v1.firewall_1 c9e39fb2-ce20-46c8-a964-25f3898c7a97
    89  ```