openstack_fw_rule_v2
This instruction is a copy of the official OpenStack Terraform provider's OpenStack Terraform documentation in the Terraform Registry.
Manages a v2 firewall rule resource within OpenStack.
Firewall v2 has no support for OVN currently.
Example Usage
resource "openstack_fw_rule_v2" "rule_2" {
name = "firewall_rule"
description = "drop TELNET traffic"
action = "deny"
protocol = "tcp"
destination_port = "23"
enabled = "true"
}
Argument Reference
The following arguments are supported:
-
region
— (Optional) The region in which to obtain the v2 networking client. A networking client is needed to create a firewall rule. If omitted, theregion
argument of the provider is used. Changing this creates a new firewall rule. -
name
— (Optional) A unique name for the firewall rule. Changing this updates thename
of an existing firewall rule. -
description
— (Optional) A description for the firewall rule. Changing this updates thedescription
of an existing firewall rule. -
tenant_id
— (Optional) — This argument conflicts and is interchangeable withproject_id
. The owner of the firewall rule. Required if admin wants to create a firewall rule for another tenant. Changing this creates a new firewall rule. -
project_id
— (Optional) — This argument conflicts and is interchangeable withtenant_id
. The owner of the firewall rule. Required if admin wants to create a firewall rule for another project. Changing this creates a new firewall rule. -
protocol
— (Optional; Required ifsource_port
ordestination_port
is not empty) The protocol type on which the firewall rule operates. Valid values are:tcp
,udp
,icmp
andany
. Changing this updates theprotocol
of an existing firewall rule. Default isany
. -
action
— (Optional) Action to be taken (must be "allow", "deny" or "reject") when the firewall rule matches. Changing this updates theaction
of an existing firewall rule. Default isdeny
. -
ip_version
— (Optional) IP version, either 4 or 6. Changing this updates theip_version
of an existing firewall rule. Default is4
. -
source_ip_address