Skip to content

f5xc_forward_proxy_policy Resource - terraform-provider-f5xc

Manages a Forward Proxy Policy resource in F5 Distributed Cloud for forward proxy policy specification. configuration.

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

# Forward Proxy Policy Resource Example
# Manages a Forward Proxy Policy resource in F5 Distributed Cloud for forward proxy policy specification. configuration.
terraform {
required_version = ">= 1.0"
required_providers {
f5xc = {
source = "f5xc-salesdemos/f5xc"
version = ">= 0.1.0"
}
}
}
# Basic Forward Proxy Policy configuration
resource "f5xc_forward_proxy_policy" "example" {
name = "example-forward-proxy-policy"
namespace = "staging"
labels = {
environment = "production"
managed_by = "terraform"
}
annotations = {
"owner" = "platform-team"
}
# Forward Proxy Policy configuration
proxy_label_selector {
expressions = ["app in (web, api)"]
}
drp_http_connect {
any_proxy {}
rule_list {
rules {
metadata {
name = "allow-external"
}
spec {
action = "ALLOW"
dst_list {
any_dst {}
}
}
}
}
}
}

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

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

namespace - Required String
Namespace where the Forward Proxy 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

-> One of the following:allow_all - Optional Block
Enable this option

allow_list - Optional Block
URL(s) and domains policy for forward proxy for a connection type (TLS or HTTP)
See Allow List below for details.

deny_list - Optional Block
URL(s) and domains policy for forward proxy for a connection type (TLS or HTTP)
See Deny List below for details.

rule_list - Optional Block
Custom Rule List. List of custom rules
See Rule List below for details.

-> One of the following:any_proxy - Optional Block
Enable this option

drp_http_connect - Optional Block
Configuration parameter for drp HTTP connect

network_connector - Optional Block
Type establishes a direct reference from one object(the referrer) to another(the referred). Such a reference is in form of tenant/namespace/name
See Network Connector below for details.

proxy_label_selector - Optional Block
Type can be used to establish a ‘selector reference’ from one object(called selector) to a set of other objects(called selectees) based on the value of expressions. A label selector is a label query over a set of resources. An empty label selector matches all objects
See Proxy Label Selector 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


An allow_list block supports the following:

default_action_allow - Optional Block
Enable this option

default_action_deny - Optional Block
Enable this option

default_action_next_policy - Optional Block
Policy configuration for this feature

dest_list - Optional Block
L4 destinations for non-HTTP and non-TLS connections and TLS connections without SNI
See Dest List below.

http_list - Optional Block
HTTP URLs. URLs for HTTP connections
See HTTP List below.

tls_list - Optional Block
TLS Domains. Domains in SNI for TLS connections
See TLS List below.

A dest_list block (within allow_list) supports the following:

ipv6_prefixes - Optional List
IPv6 Prefixes. Destination IPv6 prefixes

port_ranges - Optional String
String containing a comma separated list of port ranges. Each port range consists of a single port or two ports separated by ’-’

prefixes - Optional List
IPv4 Prefixes. Destination IPv4 prefixes

A http_list block (within allow_list) supports the following:

any_path - Optional Block
Enable this option

exact_value - Optional String
Exact domain name

path_exact_value - Optional String
Exact Path to match

path_prefix_value - Optional String
Prefix of Path e.g ‘/abc/xyz’ will match ‘/abc/xyz/.*’

path_regex_value - Optional String
Regular Expression value for the Path to match

regex_value - Optional String
Regular Expression value for the domain name

suffix_value - Optional String
Suffix of domain names e.g ‘xyz.com’ will match ‘*.xyz.com’

A tls_list block (within allow_list) supports the following:

exact_value - Optional String
Exact domain name

regex_value - Optional String
Regular Expression value for the domain name

suffix_value - Optional String
Suffix of domain name e.g ‘xyz.com’ will match ‘*.xyz.com’ and ‘xyz.com’

A deny_list block supports the following:

default_action_allow - Optional Block
Enable this option

default_action_deny - Optional Block
Enable this option

default_action_next_policy - Optional Block
Policy configuration for this feature

dest_list - Optional Block
L4 destinations for non-HTTP and non-TLS connections and TLS connections without SNI
See Dest List below.

http_list - Optional Block
HTTP URLs. URLs for HTTP connections
See HTTP List below.

tls_list - Optional Block
TLS Domains. Domains in SNI for TLS connections
See TLS List below.

A dest_list block (within deny_list) supports the following:

ipv6_prefixes - Optional List
IPv6 Prefixes. Destination IPv6 prefixes

port_ranges - Optional String
String containing a comma separated list of port ranges. Each port range consists of a single port or two ports separated by ’-’

prefixes - Optional List
IPv4 Prefixes. Destination IPv4 prefixes

A http_list block (within deny_list) supports the following:

any_path - Optional Block
Enable this option

exact_value - Optional String
Exact domain name

path_exact_value - Optional String
Exact Path to match

path_prefix_value - Optional String
Prefix of Path e.g ‘/abc/xyz’ will match ‘/abc/xyz/.*’

path_regex_value - Optional String
Regular Expression value for the Path to match

regex_value - Optional String
Regular Expression value for the domain name

suffix_value - Optional String
Suffix of domain names e.g ‘xyz.com’ will match ‘*.xyz.com’

A tls_list block (within deny_list) supports the following:

exact_value - Optional String
Exact domain name

regex_value - Optional String
Regular Expression value for the domain name

suffix_value - Optional String
Suffix of domain name e.g ‘xyz.com’ will match ‘*.xyz.com’ and ‘xyz.com’

A network_connector block supports the following:

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

A proxy_label_selector block supports the following:

expressions - Optional List
Expressions contains the Kubernetes style label expression for selections

A rule_list block supports the following:

rules - Optional Block
Custom Rule List. List of custom rules
See Rules below.

A rules block (within rule_list) supports the following:

action - Optional String Defaults to DENY
Possible values are DENY, ALLOW, NEXT_POLICY
[Enum: DENY|ALLOW|NEXT_POLICY] The rule action determines the disposition of the input request API. If a policy matches a rule with an ALLOW action, the processing of the request proceeds forward. If it matches a rule with a DENY action, the processing of the request is terminated and an appropriate message/code returned to

all_destinations - Optional Block
Configuration parameter for all destinations

all_sources - Optional Block
Configuration parameter for all sources

dst_asn_list - Optional Block
Unordered set of RFC 6793 defined 4-byte AS numbers that can be used to create allow or deny lists for use in network policy or service policy. It can be used to create the allow list only for DNS Load Balancer
See Dst Asn List below.

dst_asn_set - Optional Block
Type establishes a direct reference from one object(the referrer) to another(the referred). Such a reference is in form of tenant/namespace/name
See Dst Asn Set below.

dst_ip_prefix_set - Optional Block
Type establishes a direct reference from one object(the referrer) to another(the referred). Such a reference is in form of tenant/namespace/name
See Dst IP Prefix Set below.

dst_label_selector - Optional Block
Type can be used to establish a ‘selector reference’ from one object(called selector) to a set of other objects(called selectees) based on the value of expressions. A label selector is a label query over a set of resources. An empty label selector matches all objects
See Dst Label Selector below.

dst_prefix_list - Optional Block
List of IPv4 prefixes that represent an endpoint
See Dst Prefix List below.

http_list - Optional Block
URLListType
See HTTP List below.

ip_prefix_set - Optional Block
Type establishes a direct reference from one object(the referrer) to another(the referred). Such a reference is in form of tenant/namespace/name
See IP Prefix Set below.

label_selector - Optional Block
Type can be used to establish a ‘selector reference’ from one object(called selector) to a set of other objects(called selectees) based on the value of expressions. A label selector is a label query over a set of resources. An empty label selector matches all objects
See Label Selector below.

metadata - Optional Block
MessageMetaType is metadata (common attributes) of a message that only certain messages have. This information is propagated to the metadata of a child object that gets created from the containing message during view processing. The information in this type can be specified by user during create
See Metadata below.

no_http_connect_port - Optional Block
Enable this option

port_matcher - Optional Block
Port matcher specifies a list of port ranges as match criteria. The match is considered successful if the input port falls within any of the port ranges. The result of the match is inverted if invert_matcher is true
See Port Matcher below.

prefix_list - Optional Block
List of IPv4 prefixes that represent an endpoint
See Prefix List below.

tls_list - Optional Block
DomainListType
See TLS List below.

url_category_list - Optional Block
URL Category List Type. List of URL categories
See URL Category List below.

A dst_asn_list block (within rule_list.rules) supports the following:

as_numbers - Optional List
Unordered set of RFC 6793 defined 4-byte AS numbers that can be used to create allow or deny lists for use in network policy or service policy. It can be used to create the allow list only for DNS Load Balancer

A dst_asn_set block (within rule_list.rules) supports the following:

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

A dst_ip_prefix_set block (within rule_list.rules) supports the following:

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

A dst_label_selector block (within rule_list.rules) supports the following:

expressions - Optional List
Expressions contains the Kubernetes style label expression for selections

A dst_prefix_list block (within rule_list.rules) supports the following:

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

A http_list block (within rule_list.rules) supports the following:

http_list - Optional Block
HTTP URLs. URLs for HTTP connections
See HTTP List below.

A http_list block (within rule_list.rules.http_list) supports the following:

any_path - Optional Block
Enable this option

exact_value - Optional String
Exact domain name

path_exact_value - Optional String
Exact Path to match

path_prefix_value - Optional String
Prefix of Path e.g ‘/abc/xyz’ will match ‘/abc/xyz/.*’

path_regex_value - Optional String
Regular Expression value for the Path to match

regex_value - Optional String
Regular Expression value for the domain name

suffix_value - Optional String
Suffix of domain names e.g ‘xyz.com’ will match ‘*.xyz.com’

An ip_prefix_set block (within rule_list.rules) supports the following:

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

A label_selector block (within rule_list.rules) supports the following:

expressions - Optional List
Expressions contains the Kubernetes style label expression for selections

A metadata block (within rule_list.rules) supports the following:

description_spec - Optional String
Description. Human readable description

name - Optional String
Name of the message. The value of name has to follow DNS-1035 format

A port_matcher block (within rule_list.rules) supports the following:

invert_matcher - Optional Bool
Invert Port Matcher. Invert the match result

ports - Optional List
List of strings, each of which is a single port value or a tuple of start and end port values separated by ’-’. The start and end values are considered to be part of the range

A prefix_list block (within rule_list.rules) supports the following:

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

A tls_list block (within rule_list.rules) supports the following:

tls_list - Optional Block
TLS Domains. Domains in SNI for TLS connections
See TLS List below.

A tls_list block (within rule_list.rules.tls_list) supports the following:

exact_value - Optional String
Exact domain name

regex_value - Optional String
Regular Expression value for the domain name

suffix_value - Optional String
Suffix of domain name e.g ‘xyz.com’ will match ‘*.xyz.com’ and ‘xyz.com’

An url_category_list block (within rule_list.rules) supports the following:

url_categories - Optional List Defaults to UNCATEGORIZED
Possible values are UNCATEGORIZED, REAL_ESTATE, COMPUTER_AND_INTERNET_SECURITY, FINANCIAL_SERVICES, BUSINESS_AND_ECONOMY, COMPUTER_AND_INTERNET_INFO, AUCTIONS, SHOPPING, CULT_AND_OCCULT, TRAVEL, ABUSED_DRUGS, ADULT_AND_PORNOGRAPHY, HOME_AND_GARDEN, MILITARY, SOCIAL_NETWORKING, DEAD_SITES, INDIVIDUAL_STOCK_ADVICE_AND_TOOLS, TRAINING_AND_TOOLS, DATING, SEX_EDUCATION, RELIGION, ENTERTAINMENT_AND_ARTS, PERSONAL_SITES_AND_BLOGS, LEGAL, LOCAL_INFORMATION, STREAMING_MEDIA, JOB_SEARCH, GAMBLING, TRANSLATION, REFERENCE_AND_RESEARCH, SHAREWARE_AND_FREEWARE, PEER_TO_PEER, MARIJUANA, HACKING, GAMES, PHILOSOPHY_AND_POLITICAL_ADVOCACY, WEAPONS, PAY_TO_SURF, HUNTING_AND_FISHING, SOCIETY, EDUCATIONAL_INSTITUTIONS, ONLINE_GREETING_CARDS, SPORTS, SWIMSUITS_AND_INTIMATE_APPAREL, QUESTIONABLE, KIDS, HATE_AND_RACISM, PERSONAL_STORAGE, VIOLENCE, KEYLOGGERS_AND_MONITORING, SEARCH_ENGINES, INTERNET_PORTALS, WEB_ADVERTISEMENTS, CHEATING, GROSS, WEB_BASED_EMAIL, MALWARE_SITES, PHISHING_AND_OTHER_FRAUDS, PROXY_AVOIDANCE_AND_ANONYMIZERS, SPYWARE_AND_ADWARE, MUSIC, GOVERNMENT, NUDITY, NEWS_AND_MEDIA, ILLEGAL, CONTENT_DELIVERY_NETWORKS, INTERNET_COMMUNICATIONS, BOT_NETS, ABORTION, HEALTH_AND_MEDICINE, CONFIRMED_SPAM_SOURCES, SPAM_URLS, UNCONFIRMED_SPAM_SOURCES, OPEN_HTTP_PROXIES, DYNAMICALLY_GENERATED_CONTENT, PARKED_DOMAINS, ALCOHOL_AND_TOBACCO, PRIVATE_IP_ADDRESSES, IMAGE_AND_VIDEO_SEARCH, FASHION_AND_BEAUTY, RECREATION_AND_HOBBIES, MOTOR_VEHICLES, WEB_HOSTING
[Enum: UNCATEGORIZED|REAL_ESTATE|COMPUTER_AND_INTERNET_SECURITY|FINANCIAL_SERVICES|BUSINESS_AND_ECONOMY|COMPUTER_AND_INTERNET_INFO|AUCTIONS|SHOPPING|CULT_AND_OCCULT|TRAVEL|ABUSED_DRUGS|ADULT_AND_PORNOGRAPHY|HOME_AND_GARDEN|MILITARY|SOCIAL_NETWORKING|DEAD_SITES|INDIVIDUAL_STOCK_ADVICE_AND_TOOLS|TRAINING_AND_TOOLS|DATING|SEX_EDUCATION|RELIGION|ENTERTAINMENT_AND_ARTS|PERSONAL_SITES_AND_BLOGS|LEGAL|LOCAL_INFORMATION|STREAMING_MEDIA|JOB_SEARCH|GAMBLING|TRANSLATION|REFERENCE_AND_RESEARCH|SHAREWARE_AND_FREEWARE|PEER_TO_PEER|MARIJUANA|HACKING|GAMES|PHILOSOPHY_AND_POLITICAL_ADVOCACY|WEAPONS|PAY_TO_SURF|HUNTING_AND_FISHING|SOCIETY|EDUCATIONAL_INSTITUTIONS|ONLINE_GREETING_CARDS|SPORTS|SWIMSUITS_AND_INTIMATE_APPAREL|QUESTIONABLE|KIDS|HATE_AND_RACISM|PERSONAL_STORAGE|VIOLENCE|KEYLOGGERS_AND_MONITORING|SEARCH_ENGINES|INTERNET_PORTALS|WEB_ADVERTISEMENTS|CHEATING|GROSS|WEB_BASED_EMAIL|MALWARE_SITES|PHISHING_AND_OTHER_FRAUDS|PROXY_AVOIDANCE_AND_ANONYMIZERS|SPYWARE_AND_ADWARE|MUSIC|GOVERNMENT|NUDITY|NEWS_AND_MEDIA|ILLEGAL|CONTENT_DELIVERY_NETWORKS|INTERNET_COMMUNICATIONS|BOT_NETS|ABORTION|HEALTH_AND_MEDICINE|CONFIRMED_SPAM_SOURCES|SPAM_URLS|UNCONFIRMED_SPAM_SOURCES|OPEN_HTTP_PROXIES|DYNAMICALLY_GENERATED_CONTENT|PARKED_DOMAINS|ALCOHOL_AND_TOBACCO|PRIVATE_IP_ADDRESSES|IMAGE_AND_VIDEO_SEARCH|FASHION_AND_BEAUTY|RECREATION_AND_HOBBIES|MOTOR_VEHICLES|WEB_HOSTING] List of URL categories to be selected

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_forward_proxy_policy.example system/example