github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/website/source/docs/providers/openstack/r/fw_rule_v1.html.markdown (about) 1 --- 2 layout: "openstack" 3 page_title: "OpenStack: openstack_fw_rule_v1" 4 sidebar_current: "docs-openstack-resource-fw-rule-v1" 5 description: |- 6 Manages a v1 firewall rule resource within OpenStack. 7 --- 8 9 # openstack\_fw\_rule_v1 10 11 Manages a v1 firewall rule resource within OpenStack. 12 13 ## Example Usage 14 15 ``` 16 resource "openstack_fw_rule_v1" "rule_1" { 17 name = "my_rule" 18 description = "drop TELNET traffic" 19 action = "deny" 20 protocol = "tcp" 21 destination_port = "23" 22 enabled = "true" 23 } 24 ``` 25 26 ## Argument Reference 27 28 The following arguments are supported: 29 30 * `region` - (Required) The region in which to obtain the v1 Compute client. 31 A Compute client is needed to create a firewall rule. If omitted, the 32 `OS_REGION_NAME` environment variable is used. Changing this creates a new 33 firewall rule. 34 35 * `name` - (Optional) A unique name for the firewall rule. Changing this 36 updates the `name` of an existing firewall rule. 37 38 * `description` - (Optional) A description for the firewall rule. Changing this 39 updates the `description` of an existing firewall rule. 40 41 * `protocol` - (Required) The protocol type on which the firewall rule operates. 42 Valid values are: `tcp`, `udp`, `icmp`, and `any`. Changing this updates the 43 `protocol` of an existing firewall rule. 44 45 * `action` - (Required) Action to be taken ( must be "allow" or "deny") when the 46 firewall rule matches. Changing this updates the `action` of an existing 47 firewall rule. 48 49 * `ip_version` - (Optional) IP version, either 4 (default) or 6. Changing this 50 updates the `ip_version` of an existing firewall rule. 51 52 * `source_ip_address` - (Optional) The source IP address on which the firewall 53 rule operates. Changing this updates the `source_ip_address` of an existing 54 firewall rule. 55 56 * `destination_ip_address` - (Optional) The destination IP address on which the 57 firewall rule operates. Changing this updates the `destination_ip_address` 58 of an existing firewall rule. 59 60 * `source_port` - (Optional) The source port on which the firewall 61 rule operates. Changing this updates the `source_port` of an existing 62 firewall rule. 63 64 * `destination_port` - (Optional) The destination port on which the firewall 65 rule operates. Changing this updates the `destination_port` of an existing 66 firewall rule. 67 68 * `enabled` - (Optional) Enabled status for the firewall rule (must be "true" 69 or "false" if provided - defaults to "true"). Changing this updates the 70 `enabled` status of an existing firewall rule. 71 72 * `tenant_id` - (Optional) The owner of the firewall rule. Required if admin 73 wants to create a firewall rule for another tenant. Changing this creates a 74 new firewall rule. 75 76 * `value_specs` - (Optional) Map of additional options. 77 78 ## Attributes Reference 79 80 The following attributes are exported: 81 82 * `region` - See Argument Reference above. 83 * `name` - See Argument Reference above. 84 * `description` - See Argument Reference above. 85 * `protocol` - See Argument Reference above. 86 * `action` - See Argument Reference above. 87 * `ip_version` - See Argument Reference above. 88 * `source_ip_address` - See Argument Reference above. 89 * `destination_ip_address` - See Argument Reference above. 90 * `source_port` - See Argument Reference above. 91 * `destination_port` - See Argument Reference above. 92 * `enabled` - See Argument Reference above. 93 * `tenant_id` - See Argument Reference above. 94 95 ## Import 96 97 Firewall Rules can be imported using the `id`, e.g. 98 99 ``` 100 $ terraform import openstack_fw_rule_v1.rule_1 8dbc0c28-e49c-463f-b712-5c5d1bbac327 101 ```