Skip to content

xcsh_cdn_cache_rule (Data Source)

Retrieves information about a CDN Cache Rule resource in F5 Distributed Cloud for CDN loadbalancer specification. configuration. This is a read-only data source.

~> Note: For more information, see the F5 Distributed Cloud API documentation.

# CDNCacheRule Data Source Example
terraform {
required_version = ">= 1.0"
required_providers {
xcsh = {
source = "f5-sales-demo/xcsh"
version = ">= 0.1.0"
}
}
}
# Look up an existing CDNCacheRule by name
data "xcsh_cdn_cache_rule" "example" {
name = "example-cdn-cache-rule"
namespace = "staging"
}
output "cdn_cache_rule_id" {
value = data.xcsh_cdn_cache_rule.example.id
}

-> 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.

• name - Required String
Name of the CDNCacheRule

• namespace - Required String
Namespace where the CDNCacheRule exists

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

• annotations - Optional Map
Annotations applied to this resource

• cache_rules - Optional String
Cache Rule. This defines a CDN Cache Rule

• description - Optional String
Description of the CDNCacheRule

• id - Optional String
Unique identifier for the resource

• labels - Optional Map
Labels applied to this resource

• cache_bypass - Optional Object
Configuration parameter for cache bypass

• eligible_for_cache - Optional String
Configuration parameter for eligible for cache

• rule_expression_list - Optional List
Expressions are evaluated in the order in which they are specified. The evaluation stops when the first rule match occurs

• rule_name - Optional String
Rule Name. Name of the Cache Rule

• scheme_proxy_host_request_uri - Optional String
Cache TTL Enable Props. Cache TTL Enable Values

• scheme_proxy_host_uri - Optional String
Cache TTL Enable Props. Cache TTL Enable Values

• cache_override - Optional Bool
Cache Override. Honour Cache Override

• cache_ttl - Optional String
Cache TTL value is used to cache the resource/content for the specified amount of time Format: [0-9][smhd], where s - seconds, m - minutes, h - hours, d - days

• ignore_response_cookie - Optional Bool
By default, response will not be cached if set-cookie header is present. This option will override the behavior and cache response even with set-cookie header present

• cache_override - Optional Bool
Cache Override. Honour Cache Override

• cache_ttl - Optional String
Cache TTL value is used to cache the resource/content for the specified amount of time Format: [0-9][smhd], where s - seconds, m - minutes, h - hours, d - days

• ignore_response_cookie - Optional Bool
By default, response will not be cached if set-cookie header is present. This option will override the behavior and cache response even with set-cookie header present

• cache_rule_expression - Optional List
The Cache Rule Expression Terms that are ANDed

• expression_name - Optional String
Name of the Expressions items that are ANDed

• cache_headers - Optional List
Configure cache rule headers to match the criteria

• cookie_matcher - Optional List
List of predicates for all cookies that need to be matched. The criteria for matching each cookie is described in individual instances of CookieMatcherType. The actual cookie values are extracted from the request API as a list of strings for each cookie name

• path_match - Optional String
Path match of the URI can be either be, Prefix match or exact match or regular expression match

• query_parameters - Optional List
Query Parameters. List of (key, value) query parameters

• name - Optional String Defaults to PROXY_HOST
Possible values are PROXY_HOST, REFERER, SCHEME, USER_AGENT
[Enum: PROXY_HOST|REFERER|SCHEME|USER_AGENT] - PROXY_HOST: Proxy hostname of the proxied server - REFERER: Referer This is the address of the previous web page from which a link to the currently requested page was followed - SCHEME: Scheme The HTTP scheme used: HTTP or HTTPS - USER_AGENT: User Agent The user agent string of the user agent

• operator - Optional String
Operator

• contains - Optional String
The header value must include the specified value as a substring

• does_not_contain - Optional String
The header value must not include the specified value as a substring

• does_not_end_with - Optional String
The header value must not end with the specified value

• does_not_equal - Optional String
The header value must not match the specified value

• does_not_start_with - Optional String
The header value must not begin with the specified value

• endswith - Optional String
The header value must end with the specified value

• equals - Optional String
The header value must exactly match the specified value

• match_regex - Optional String
The header value must match the specified regular expression pattern

• startswith - Optional String
The header value must begin with the specified value

• name - Optional String
Cookie Name. Enter the name of the cookie to match

• operator - Optional String
Operator

• contains - Optional String
The cookie value must include the specified value as a substring

• does_not_contain - Optional String
The cookie value must not include the specified value as a substring

• does_not_end_with - Optional String
The cookie value must not end with the specified value

• does_not_equal - Optional String
The cookie value must not match the specified value

• does_not_start_with - Optional String
The cookie value must not begin with the specified value

• endswith - Optional String
The cookie value must end with the specified value

• equals - Optional String
The cookie value must exactly match the specified value

• match_regex - Optional String
The cookie value must match the specified regular expression pattern in PCRE format

• startswith - Optional String
The cookie value must begin with the specified value

• operator - Optional String
Operator

• contains - Optional String
The path must include the specified value as a substring, up to the filename

• does_not_contain - Optional String
The path must not include the specified value as a substring, up to the filename

• does_not_end_with - Optional String
The path must not end with the specified value, up to the filename

• does_not_equal - Optional String
The path must not match the specified value, up to the filename

• does_not_start_with - Optional String
The path must not begin with the specified value, up to the filename

• endswith - Optional String
The path must end with the specified value, up to the filename

• equals - Optional String
The path must exactly match the specified value, up to the filename

• match_regex - Optional String
The path must match the specified regular expression pattern in PCRE format

• startswith - Optional String
The path must begin with the specified value, up to the filename

• key - Optional String
The name of the query parameter to match

• operator - Optional String
Operator

• contains - Optional String
The query parameter value must include the specified value as a substring

• does_not_contain - Optional String
The query parameter value must not include the specified value as a substring

• does_not_end_with - Optional String
The query parameter value must not end with the specified value

• does_not_equal - Optional String
The query parameter value must not match the specified value

• does_not_start_with - Optional String
The query parameter value must not begin with the specified value

• endswith - Optional String
The query parameter value must end with the specified value

• equals - Optional String
The query parameter value must exactly match the specified value

• match_regex - Optional String
The query parameter value must match the specified regular expression pattern in PCRE format

• startswith - Optional String
The query parameter value must begin with the specified value


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