github.com/koding/terraform@v0.6.4-0.20170608090606-5d7e0339779d/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 * `associated_routers` - (Optional) Router(s) to associate this firewall instance 75 with. Must be a list of strings. Changing this updates the associated routers 76 of an existing firewall. Conflicts with `no_routers`. 77 78 * `no_routers` - (Optional) Should this firewall not be associated with any routers 79 (must be "true" or "false" if provide - defaults to "false"). 80 Conflicts with `associated_routers`. 81 82 * `value_specs` - (Optional) Map of additional options. 83 84 ## Attributes Reference 85 86 The following attributes are exported: 87 88 * `region` - See Argument Reference above. 89 * `policy_id` - See Argument Reference above. 90 * `name` - See Argument Reference above. 91 * `description` - See Argument Reference above. 92 * `admin_state_up` - See Argument Reference above. 93 * `tenant_id` - See Argument Reference above. 94 * `associated_routers` - See Argument Reference above. 95 * `no_routers` - See Argument Reference above. 96 97 ## Import 98 99 Firewalls can be imported using the `id`, e.g. 100 101 ``` 102 $ terraform import openstack_fw_firewall_v1.firewall_1 c9e39fb2-ce20-46c8-a964-25f3898c7a97 103 ```