github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/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  ```hcl
    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  
    37    rules = ["${openstack_fw_rule_v1.rule_1.id}",
    38      "${openstack_fw_rule_v1.rule_2.id}",
    39    ]
    40  }
    41  
    42  resource "openstack_fw_firewall_v1" "firewall_1" {
    43    name      = "my-firewall"
    44    policy_id = "${openstack_fw_policy_v1.policy_1.id}"
    45  }
    46  ```
    47  
    48  ## Argument Reference
    49  
    50  The following arguments are supported:
    51  
    52  * `region` - (Required) The region in which to obtain the v1 networking client.
    53      A networking client is needed to create a firewall. If omitted, the
    54      `OS_REGION_NAME` environment variable is used. Changing this creates a new
    55      firewall.
    56  
    57  * `policy_id` - (Required) The policy resource id for the firewall. Changing
    58      this updates the `policy_id` of an existing firewall.
    59  
    60  * `name` - (Optional) A name for the firewall. Changing this
    61      updates the `name` of an existing firewall.
    62  
    63  * `description` - (Required) A description for the firewall. Changing this
    64      updates the `description` of an existing firewall.
    65  
    66  * `admin_state_up` - (Optional) Administrative up/down status for the firewall
    67      (must be "true" or "false" if provided - defaults to "true").
    68      Changing this updates the `admin_state_up` of an existing firewall.
    69  
    70  * `tenant_id` - (Optional) The owner of the floating IP. Required if admin wants
    71      to create a firewall for another tenant. Changing this creates a new
    72      firewall.
    73  
    74  * `value_specs` - (Optional) Map of additional options.
    75  
    76  ## Attributes Reference
    77  
    78  The following attributes are exported:
    79  
    80  * `region` - See Argument Reference above.
    81  * `policy_id` - See Argument Reference above.
    82  * `name` - See Argument Reference above.
    83  * `description` - See Argument Reference above.
    84  * `admin_state_up` - See Argument Reference above.
    85  * `tenant_id` - See Argument Reference above.
    86  
    87  ## Import
    88  
    89  Firewalls can be imported using the `id`, e.g.
    90  
    91  ```
    92  $ terraform import openstack_fw_firewall_v1.firewall_1 c9e39fb2-ce20-46c8-a964-25f3898c7a97
    93  ```