github.com/ns1/terraform@v0.7.10-0.20161109153551-8949419bef40/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). If this is "true" the policy is visible to, and
    68      can be used in, firewalls in other tenants. Changing this updates the
    69      `shared` status of an existing firewall policy. Only administrative users
    70      can specify if the policy should be shared.
    71  
    72  * `value_specs` - (Optional) Map of additional options.
    73  
    74  ## Attributes Reference
    75  
    76  The following attributes are exported:
    77  
    78  * `region` - See Argument Reference above.
    79  * `name` - See Argument Reference above.
    80  * `description` - See Argument Reference above.
    81  * `audited` - See Argument Reference above.
    82  * `shared` - See Argument Reference above.
    83  
    84  ## Import
    85  
    86  Firewall Policies can be imported using the `id`, e.g.
    87  
    88  ```
    89  $ terraform import openstack_fw_policy_v1.policy_1 07f422e6-c596-474b-8b94-fe2c12506ce0
    90  ```