- Home
- Documentation
- Security
- Data Sources
- xcsh_nat_policy (Data Source)
xcsh_nat_policy (Data Source)
Retrieves information about a NAT Policy resource in F5 Distributed Cloud for nat policy create specification configures nat policy with multiple rules,. configuration. This is a read-only data source.
~> Note: For more information, see the F5 Distributed Cloud API documentation.
Example Usage
Section titled “Example Usage”# NATPolicy Data Source Example
terraform { required_version = ">= 1.0"
required_providers { xcsh = { source = "f5-sales-demo/xcsh" version = ">= 0.1.0" } }}
# Look up an existing NATPolicy by namedata "xcsh_nat_policy" "example" { name = "example-nat-policy" namespace = "staging"}
output "nat_policy_id" { value = data.xcsh_nat_policy.example.id}Argument Reference
Section titled “Argument Reference”-> Syntax Rule: This provider uses OneOf groups for mutually exclusive options. Fields documented as “Optional Block” use block syntax field_name { ... }. Empty OneOf object attributes use field_name = {}; conditional selection uses condition ? {} : null. Boolean attributes (such as add_hsts and http_redirect) use = true or = false.
🔶 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 NATPolicy
• namespace - Required String
Namespace where the NATPolicy exists
Attributes Reference
Section titled “Attributes Reference”In addition to all arguments above, the following attributes are exported:
• annotations - Optional Map
Annotations applied to this resource
• description - Optional String
Description of the NATPolicy
• id - Optional String
Unique identifier for the resource
• labels - Optional Map
Labels applied to this resource
• rules - Optional List
List of rules to apply under the NAT Policy. Rule that matches first would be applied
• site - Optional String
Site Reference Type. Reference to Site Object
A rules block supports the following:
• action - Optional String
Action to apply on the packet if the NAT rule is applied
• cloud_connect - Optional String
Configuration parameter for cloud connect
• criteria - Optional String
Match criteria of the packet to apply the NAT Rule
• disable_spec - Optional Object
Enable this option
• enable - Optional Object
Enable this option
• name - Optional String
Name. Name of the Rule
• node_interface - Optional String
On multinode site, this type holds the information about per node interfaces
• segment - Optional String
Segment Reference Type. Reference to Segment Object
• virtual_network - Optional String
Carries the reference to virtual network
Rules Action
Section titled “Rules Action”An action block (within rules) supports the following:
• dynamic - Optional String
Dynamic Pool. Dynamic Pool Configuration
• 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 String
List of references to Cloud Elastic IP Object
• pools - Optional String
List of IPv4 prefixes that represent an endpoint
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 List
Reference to one or more cloud elastic IP objects
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 List
Cloud Connect. Reference to Cloud Connect Object
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 Object
Enable this option
• destination_cidr - Optional List
Destination IP. Destination IP of the packet to match
• icmp - Optional Object
Enable this option
• site_local_inside_network - Optional Object
Enable this option
• site_local_network - Optional Object
Enable this option
• source_cidr - Optional List
Source IP. Source IP of the packet to match
• tcp - Optional String
Action to apply on the packet if the NAT rule is applied
• udp - Optional String
Action to apply on the packet if the NAT rule is applied
Rules Criteria TCP
Section titled “Rules Criteria TCP”A tcp block (within rules.criteria) supports the following:
• destination_port - Optional String
Port match of the request can be a range or a specific port
• source_port - Optional String
Port match of the request can be a range or a specific port
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 Object
Enable this option
• port - Optional Number
Exact Port to match
• port_ranges - Optional String
Port range to match
Rules Criteria TCP Destination Port No Port Match
Section titled “Rules Criteria TCP Destination Port No Port Match”Deeply nested Match block collapsed for readability.
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 Object
Enable this option
• port - Optional Number
Exact Port to match
• port_ranges - Optional String
Port range to match
Rules Criteria TCP Source Port No Port Match
Section titled “Rules Criteria TCP Source Port No Port Match”Deeply nested Match block collapsed for readability.
Rules Criteria UDP
Section titled “Rules Criteria UDP”An udp block (within rules.criteria) supports the following:
• destination_port - Optional String
Port match of the request can be a range or a specific port
• source_port - Optional String
Port match of the request can be a range or a specific port
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 Object
Enable this option
• port - Optional Number
Exact Port to match
• port_ranges - Optional String
Port range to match
Rules Criteria UDP Destination Port No Port Match
Section titled “Rules Criteria UDP Destination Port No Port Match”Deeply nested Match block collapsed for readability.
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 Object
Enable this option
• port - Optional Number
Exact Port to match
• port_ranges - Optional String
Port range to match
Rules Criteria UDP Source Port No Port Match
Section titled “Rules Criteria UDP Source Port No Port Match”Deeply nested Match block collapsed for readability.
Rules Disable Spec
Section titled “Rules Disable Spec”A disable_spec block (within rules) supports the following:
Rules Enable
Section titled “Rules Enable”An enable block (within rules) supports the following:
Rules Node Interface
Section titled “Rules Node Interface”A node_interface block (within rules) supports the following:
• list - Optional List
On a multinode site, this list holds the nodes and corresponding networking_interface
Rules Node Interface List
Section titled “Rules Node Interface List”A list block (within rules.node_interface) supports the following:
• interface - Optional List
Interface. Interface reference on this node
• node - Optional String
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 List
Segment. Reference to Segment Object
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 List
Virtual Network Reference. Reference to virtual network
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 List
Site. Reference to Site Object
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
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 |