- Home
- Documentation
- resources
- f5xc_nat_policy Resource - terraform-provider-f5xc
f5xc_nat_policy Resource - terraform-provider-f5xc
f5xc_nat_policy (Resource)
Section titled “f5xc_nat_policy (Resource)”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.
Example Usage
Section titled “Example Usage”# 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 configurationresource "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 }}Argument Reference
Section titled “Argument Reference”🔶 High Risk Operations — Some operations on this resource have high danger level. Destructive operations may require confirmation.
Metadata Argument Reference
Section titled “Metadata Argument Reference”• 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
Spec Argument Reference
Section titled “Spec Argument Reference”• 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.
Attributes Reference
Section titled “Attributes Reference”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.
Rules Action
Section titled “Rules Action”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
Rules Action Dynamic
Section titled “Rules Action Dynamic”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.
Rules Action Dynamic Elastic Ips
Section titled “Rules Action Dynamic Elastic Ips”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.
Rules Action Dynamic Elastic Ips Refs
Section titled “Rules Action Dynamic Elastic Ips Refs”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
Rules Action Dynamic Pools
Section titled “Rules Action Dynamic Pools”A pools block (within rules.action.dynamic) supports the following:
• prefixes - Optional List
List of IPv4 prefixes that represent an endpoint
Rules Cloud Connect
Section titled “Rules Cloud Connect”A cloud_connect block (within rules) supports the following:
• refs - Optional Block
Reference to Cloud Connect Object
See Refs below.
Rules Cloud Connect Refs
Section titled “Rules Cloud Connect Refs”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
Rules Criteria
Section titled “Rules Criteria”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.
Rules Criteria Destination Port
Section titled “Rules Criteria Destination Port”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
Rules Criteria Segment
Section titled “Rules Criteria Segment”A segment block (within rules.criteria) supports the following:
• refs - Optional Block
Reference to Segment Object
See Refs below.
Rules Criteria Segment Refs
Section titled “Rules Criteria Segment Refs”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
Rules Criteria Source Port
Section titled “Rules Criteria Source Port”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
Rules Criteria TCP
Section titled “Rules Criteria TCP”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.
Rules Criteria TCP Destination Port
Section titled “Rules Criteria TCP Destination Port”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
Rules Criteria TCP Source Port
Section titled “Rules Criteria TCP Source Port”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
Rules Criteria UDP
Section titled “Rules Criteria UDP”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.
Rules Criteria UDP Destination Port
Section titled “Rules Criteria UDP Destination Port”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
Rules Criteria UDP Source Port
Section titled “Rules Criteria UDP Source Port”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
Rules Criteria Virtual Network
Section titled “Rules Criteria Virtual Network”A virtual_network block (within rules.criteria) supports the following:
• refs - Optional Block
Virtual Network Reference. Reference to virtual network
See Refs below.
Rules Criteria Virtual Network Refs
Section titled “Rules Criteria Virtual Network Refs”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
Rules Network Interface
Section titled “Rules Network Interface”A network_interface block (within rules) supports the following:
• refs - Optional Block
Reference to Network Interface Object
See Refs below.
Rules Network Interface Refs
Section titled “Rules Network Interface Refs”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
Rules Node Interface
Section titled “Rules Node Interface”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.
Rules Node Interface List
Section titled “Rules Node Interface List”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
Rules Node Interface List Interface
Section titled “Rules Node Interface List Interface”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
Rules Segment
Section titled “Rules Segment”A segment block (within rules) supports the following:
• refs - Optional Block
Reference to Segment Object
See Refs below.
Rules Segment Refs
Section titled “Rules Segment Refs”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
Rules Virtual Network
Section titled “Rules Virtual Network”A virtual_network block (within rules) supports the following:
• refs - Optional Block
Virtual Network Reference. Reference to virtual network
See Refs below.
Rules Virtual Network Refs
Section titled “Rules Virtual Network Refs”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.
Site Refs
Section titled “Site Refs”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
Timeouts
Section titled “Timeouts”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
Common Types
Section titled “Common Types”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.
| Field | Type | Description |
|---|---|---|
name | String | Name of the referenced object |
namespace | String | Namespace containing the referenced object |
tenant | String | Tenant of the referenced object (system-managed) |
Transformers {#common-transformers}
Section titled “Transformers {#common-transformers}”Transformers apply transformations to input values before matching. Multiple transformers can be applied in order.
| Value | Description |
|---|---|
LOWER_CASE | Convert to lowercase |
UPPER_CASE | Convert to uppercase |
BASE64_DECODE | Decodebase64 content |
NORMALIZE_PATH | Normalize URL path |
REMOVE_WHITESPACE | Remove whitespace characters |
URL_DECODE | Decode URL-encoded characters |
TRIM_LEFT | Trim leading whitespace |
TRIM_RIGHT | Trim trailing whitespace |
TRIM | Trim both leading and trailing whitespace |
HTTP Methods {#common-http-methods}
Section titled “HTTP Methods {#common-http-methods}”HTTP methods used for request matching.
| Value | Description |
|---|---|
ANY | Match any HTTP method |
GET | HTTP GET request |
HEAD | HTTP HEAD request |
POST | HTTP POST request |
PUT | HTTP PUT request |
DELETE | HTTP DELETE request |
CONNECT | HTTP CONNECT request |
OPTIONS | HTTP OPTIONS request |
TRACE | HTTP TRACE request |
PATCH | HTTP PATCH request |
COPY | HTTP COPY request (WebDAV) |
TLS Fingerprints {#common-tls-fingerprints}
Section titled “TLS Fingerprints {#common-tls-fingerprints}”TLS fingerprint categories for malicious client detection.
| Value | Description |
|---|---|
TLS_FINGERPRINT_NONE | No fingerprint matching |
ANY_MALICIOUS_FINGERPRINT | Match any known malicious fingerprint |
ADWARE | Adware-associated fingerprints |
DRIDEX | Dridex malware fingerprints |
GOOTKIT | Gootkit malware fingerprints |
RANSOMWARE | Ransomware-associated fingerprints |
TRICKBOT | Trickbot 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.
| Value | Description |
|---|---|
SPAM_SOURCES | Known spam sources |
WINDOWS_EXPLOITS | Windows exploit sources |
WEB_ATTACKS | Web attack sources |
BOTNETS | Known botnet IPs |
SCANNERS | Network scanner IPs |
REPUTATION | Poor reputation IPs |
PHISHING | Phishing-related IPs |
PROXY | Anonymous proxy IPs |
MOBILE_THREATS | Mobile threat sources |
TOR_PROXY | Tor exit nodes |
DENIAL_OF_SERVICE | DoS attack sources |
NETWORK | Known bad network ranges |
Import
Section titled “Import”Import is supported using the following syntax:
# Import using namespace/name formatterraform import f5xc_nat_policy.example system/example