Skip to content

f5xc_nat_policy Resource - terraform-provider-f5xc

Manages a NAT Policy resource in F5 Distributed Cloud for nat policy create specification configures nat policy with multiple rules,. configuration.

~> Note For more information about this resource, please refer to the F5 XC API Documentation.

# NAT Policy Resource Example
# Manages a NAT Policy resource in F5 Distributed Cloud for nat policy create specification configures nat policy with multiple rules,. configuration.
terraform {
required_version = ">= 1.0"
required_providers {
f5xc = {
source = "f5xc-salesdemos/f5xc"
version = ">= 0.1.0"
}
}
}
# Basic NAT Policy configuration
resource "f5xc_nat_policy" "example" {
name = "example-nat-policy"
namespace = "staging"
labels = {
environment = "production"
managed_by = "terraform"
}
annotations = {
"owner" = "platform-team"
}
# Resource-specific configuration
# List of rules to apply under the NAT Policy. Rule that ma...
rules {
# Configure rules settings
}
# Action to apply on the packet if the NAT rule is applied.
action {
# Configure action settings
}
# Dynamic Pool. Dynamic Pool Configuration.
dynamic {
# Configure dynamic settings
}
}

🔶 High Risk Operations — Some operations on this resource have high danger level. Destructive operations may require confirmation.

name - Required String
Name of the NAT Policy. Must be unique within the namespace

namespace - Required String
Namespace where the NAT Policy will be created

annotations - Optional Map
Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata

description - Optional String
Human readable description for the object

disable - Optional Bool
A value of true will administratively disable the object

labels - Optional Map
Labels is a user defined key value map that can be attached to resources for organization and filtering

rules - Optional Block
List of rules to apply under the NAT Policy. Rule that matches first would be applied
See Rules below for details.

site - Optional Block
Site Reference Type. Reference to Site Object
See Site below for details.

timeouts - Optional Block
See Timeouts below for details.

In addition to all arguments above, the following attributes are exported:

id - Optional String
Unique identifier for the resource


A rules block supports the following:

action - Optional Block
Action to apply on the packet if the NAT rule is applied
See Action below.

cloud_connect - Optional Block
Configuration parameter for cloud connect
See Cloud Connect below.

criteria - Optional Block
Match criteria of the packet to apply the NAT Rule
See Criteria below.

disable_spec - Optional Block
Enable this option

enable - Optional Block
Enable this option

name - Optional String
Name. Name of the Rule

network_interface - Optional Block
Configuration parameter for network interface
See Network Interface below.

node_interface - Optional Block
On multinode site, this type holds the information about per node interfaces
See Node Interface below.

segment - Optional Block
Segment Reference Type. Reference to Segment Object
See Segment below.

virtual_network - Optional Block
Carries the reference to virtual network
See Virtual Network below.

An action block (within rules) supports the following:

dynamic - Optional Block
Dynamic Pool. Dynamic Pool Configuration
See Dynamic below.

virtual_cidr - Optional String
Virtual Subnet NAT is static NAT that does a one-to-one translation between the real source IP CIDR in the policy and the virtual CIDR in a bidirectional fashion. The range of the real CIDR and virtual CIDRs should be the same (e.g. If the real CIDR has the CIDR

A dynamic block (within rules.action) supports the following:

elastic_ips - Optional Block
List of references to Cloud Elastic IP Object
See Elastic Ips below.

pools - Optional Block
List of IPv4 prefixes that represent an endpoint
See Pools below.

An elastic_ips block (within rules.action.dynamic) supports the following:

refs - Optional Block
Reference to one or more cloud elastic IP objects
See Refs below.

A refs block (within rules.action.dynamic.elastic_ips) supports the following:

kind - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then kind will hold the referred object’s kind (e.g. ‘route’)

name - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name

namespace - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace

tenant - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant

uid - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then uid will hold the referred object’s(e.g. Route’s) uid

A pools block (within rules.action.dynamic) supports the following:

prefixes - Optional List
List of IPv4 prefixes that represent an endpoint

A cloud_connect block (within rules) supports the following:

refs - Optional Block
Reference to Cloud Connect Object
See Refs below.

A refs block (within rules.cloud_connect) supports the following:

kind - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then kind will hold the referred object’s kind (e.g. ‘route’)

name - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name

namespace - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace

tenant - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant

uid - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then uid will hold the referred object’s(e.g. Route’s) uid

A criteria block (within rules) supports the following:

any - Optional Block
Enable this option

destination_cidr - Optional List
Destination IP. Destination IP of the packet to match

destination_port - Optional Block
Port match of the request can be a range or a specific port
See Destination Port below.

icmp - Optional Block
Enable this option

protocol - Optional String Defaults to ALL
Possible values are ALL, ICMP, TCP, UDP
[Enum: ALL|ICMP|TCP|UDP] Protocols. Protocols like TCP, UDP

segment - Optional Block
Segment Reference Type. Reference to Segment Object
See Segment below.

site_local_inside_network - Optional Block
Enable this option

site_local_network - Optional Block
Enable this option

source_cidr - Optional List
Source IP. Source IP of the packet to match

source_port - Optional Block
Port match of the request can be a range or a specific port
See Source Port below.

tcp - Optional Block
Action to apply on the packet if the NAT rule is applied
See TCP below.

udp - Optional Block
Action to apply on the packet if the NAT rule is applied
See UDP below.

virtual_network - Optional Block
Carries the reference to virtual network
See Virtual Network below.

A destination_port block (within rules.criteria) supports the following:

no_port_match - Optional Block
Enable this option

port - Optional Number
Exact Port to match

port_ranges - Optional String
Port range to match

A segment block (within rules.criteria) supports the following:

refs - Optional Block
Reference to Segment Object
See Refs below.

A refs block (within rules.criteria.segment) supports the following:

kind - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then kind will hold the referred object’s kind (e.g. ‘route’)

name - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name

namespace - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace

tenant - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant

uid - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then uid will hold the referred object’s(e.g. Route’s) uid

A source_port block (within rules.criteria) supports the following:

no_port_match - Optional Block
Enable this option

port - Optional Number
Exact Port to match

port_ranges - Optional String
Port range to match

A tcp block (within rules.criteria) supports the following:

destination_port - Optional Block
Port match of the request can be a range or a specific port
See Destination Port below.

source_port - Optional Block
Port match of the request can be a range or a specific port
See Source Port below.

A destination_port block (within rules.criteria.tcp) supports the following:

no_port_match - Optional Block
Enable this option

port - Optional Number
Exact Port to match

port_ranges - Optional String
Port range to match

A source_port block (within rules.criteria.tcp) supports the following:

no_port_match - Optional Block
Enable this option

port - Optional Number
Exact Port to match

port_ranges - Optional String
Port range to match

An udp block (within rules.criteria) supports the following:

destination_port - Optional Block
Port match of the request can be a range or a specific port
See Destination Port below.

source_port - Optional Block
Port match of the request can be a range or a specific port
See Source Port below.

A destination_port block (within rules.criteria.udp) supports the following:

no_port_match - Optional Block
Enable this option

port - Optional Number
Exact Port to match

port_ranges - Optional String
Port range to match

A source_port block (within rules.criteria.udp) supports the following:

no_port_match - Optional Block
Enable this option

port - Optional Number
Exact Port to match

port_ranges - Optional String
Port range to match

A virtual_network block (within rules.criteria) supports the following:

refs - Optional Block
Virtual Network Reference. Reference to virtual network
See Refs below.

A refs block (within rules.criteria.virtual_network) supports the following:

kind - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then kind will hold the referred object’s kind (e.g. ‘route’)

name - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name

namespace - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace

tenant - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant

uid - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then uid will hold the referred object’s(e.g. Route’s) uid

A network_interface block (within rules) supports the following:

refs - Optional Block
Reference to Network Interface Object
See Refs below.

A refs block (within rules.network_interface) supports the following:

kind - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then kind will hold the referred object’s kind (e.g. ‘route’)

name - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name

namespace - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace

tenant - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant

uid - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then uid will hold the referred object’s(e.g. Route’s) uid

A node_interface block (within rules) supports the following:

list - Optional Block
On a multinode site, this list holds the nodes and corresponding networking_interface
See List below.

A list block (within rules.node_interface) supports the following:

interface - Optional Block
X-displayName: ‘Interface’ Interface reference on this node
See Interface below.

node - Optional String
X-displayName: ‘Node’ Node name on this site

An interface block (within rules.node_interface.list) supports the following:

kind - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then kind will hold the referred object’s kind (e.g. ‘route’)

name - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name

namespace - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace

tenant - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant

uid - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then uid will hold the referred object’s(e.g. Route’s) uid

A segment block (within rules) supports the following:

refs - Optional Block
Reference to Segment Object
See Refs below.

A refs block (within rules.segment) supports the following:

kind - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then kind will hold the referred object’s kind (e.g. ‘route’)

name - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name

namespace - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace

tenant - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant

uid - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then uid will hold the referred object’s(e.g. Route’s) uid

A virtual_network block (within rules) supports the following:

refs - Optional Block
Virtual Network Reference. Reference to virtual network
See Refs below.

A refs block (within rules.virtual_network) supports the following:

kind - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then kind will hold the referred object’s kind (e.g. ‘route’)

name - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name

namespace - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace

tenant - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant

uid - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then uid will hold the referred object’s(e.g. Route’s) uid

A site block supports the following:

refs - Optional Block
Site. Reference to Site Object
See Refs below.

A refs block (within site) supports the following:

kind - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then kind will hold the referred object’s kind (e.g. ‘route’)

name - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name

namespace - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace

tenant - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant

uid - Optional String
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then uid will hold the referred object’s(e.g. Route’s) uid

A timeouts block supports the following:

create - Optional String (Defaults to 10 minutes)
Used when creating the resource

delete - Optional String (Defaults to 10 minutes)
Used when deleting the resource

read - Optional String (Defaults to 5 minutes)
Used when retrieving the resource

update - Optional String (Defaults to 10 minutes)
Used when updating the resource


The following type definitions are used throughout this resource. See the full definition here rather than repeated inline.

Object Reference {#common-object-reference}

Section titled “Object Reference {#common-object-reference}”

Object references establish a direct reference from one configuration object to another in F5 Distributed Cloud. References use the format tenant/namespace/name.

FieldTypeDescription
nameStringName of the referenced object
namespaceStringNamespace containing the referenced object
tenantStringTenant of the referenced object (system-managed)

Transformers apply transformations to input values before matching. Multiple transformers can be applied in order.

ValueDescription
LOWER_CASEConvert to lowercase
UPPER_CASEConvert to uppercase
BASE64_DECODEDecodebase64 content
NORMALIZE_PATHNormalize URL path
REMOVE_WHITESPACERemove whitespace characters
URL_DECODEDecode URL-encoded characters
TRIM_LEFTTrim leading whitespace
TRIM_RIGHTTrim trailing whitespace
TRIMTrim both leading and trailing whitespace

HTTP methods used for request matching.

ValueDescription
ANYMatch any HTTP method
GETHTTP GET request
HEADHTTP HEAD request
POSTHTTP POST request
PUTHTTP PUT request
DELETEHTTP DELETE request
CONNECTHTTP CONNECT request
OPTIONSHTTP OPTIONS request
TRACEHTTP TRACE request
PATCHHTTP PATCH request
COPYHTTP COPY request (WebDAV)

TLS Fingerprints {#common-tls-fingerprints}

Section titled “TLS Fingerprints {#common-tls-fingerprints}”

TLS fingerprint categories for malicious client detection.

ValueDescription
TLS_FINGERPRINT_NONENo fingerprint matching
ANY_MALICIOUS_FINGERPRINTMatch any known malicious fingerprint
ADWAREAdware-associated fingerprints
DRIDEXDridex malware fingerprints
GOOTKITGootkit malware fingerprints
RANSOMWARERansomware-associated fingerprints
TRICKBOTTrickbot malware fingerprints

IP Threat Categories {#common-ip-threat-categories}

Section titled “IP Threat Categories {#common-ip-threat-categories}”

IP address threat categories for security filtering.

ValueDescription
SPAM_SOURCESKnown spam sources
WINDOWS_EXPLOITSWindows exploit sources
WEB_ATTACKSWeb attack sources
BOTNETSKnown botnet IPs
SCANNERSNetwork scanner IPs
REPUTATIONPoor reputation IPs
PHISHINGPhishing-related IPs
PROXYAnonymous proxy IPs
MOBILE_THREATSMobile threat sources
TOR_PROXYTor exit nodes
DENIAL_OF_SERVICEDoS attack sources
NETWORKKnown bad network ranges

Import is supported using the following syntax:

Terminal window
# Import using namespace/name format
terraform import f5xc_nat_policy.example system/example