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

     1  ---
     2  layout: "openstack"
     3  page_title: "OpenStack: openstack_fw_policy_v1"
     4  sidebar_current: "docs-openstack-resource-fw-policy-v1"
     5  description: |-
     6    Manages a v1 firewall policy resource within OpenStack.
     7  ---
     8  
     9  # openstack\_fw\_policy_v1
    10  
    11  Manages a v1 firewall policy 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  
    41  ## Argument Reference
    42  
    43  The following arguments are supported:
    44  
    45  * `region` - (Required) The region in which to obtain the v1 networking client.
    46      A networking client is needed to create a firewall policy. If omitted, the
    47      `OS_REGION_NAME` environment variable is used. Changing this creates a new
    48      firewall policy.
    49  
    50  * `name` - (Optional) A name for the firewall policy. Changing this
    51      updates the `name` of an existing firewall policy.
    52  
    53  * `description` - (Optional) A description for the firewall policy. Changing
    54      this updates the `description` of an existing firewall policy.
    55  
    56  * `rules` - (Optional) An array of one or more firewall rules that comprise
    57      the policy. Changing this results in adding/removing rules from the
    58      existing firewall policy.
    59  
    60  * `audited` - (Optional) Audit status of the firewall policy
    61      (must be "true" or "false" if provided - defaults to "false").
    62      This status is set to "false" whenever the firewall policy or any of its
    63      rules are changed. Changing this updates the `audited` status of an existing
    64      firewall policy.
    65  
    66  * `shared` - (Optional) Sharing status of the firewall policy (must be "true"
    67      or "false" if provided - defaults to "false"). If this is "true" the policy
    68      is visible to, and can be used in, firewalls in other tenants. Changing this
    69      updates the `shared` status of an existing firewall policy.
    70  
    71  ## Attributes Reference
    72  
    73  The following attributes are exported:
    74  
    75  * `region` - See Argument Reference above.
    76  * `name` - See Argument Reference above.
    77  * `description` - See Argument Reference above.
    78  * `audited` - See Argument Reference above.
    79  * `shared` - See Argument Reference above.
    80  
    81  ## Import
    82  
    83  Firewall Policies can be imported using the `id`, e.g.
    84  
    85  ```
    86  $ terraform import openstack_fw_policy_v1.policy_1 07f422e6-c596-474b-8b94-fe2c12506ce0
    87  ```