- Home
- Documentation
- Load Balancing
- Data Sources
- xcsh_cdn_cache_rule (Data Source)
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.
Example Usage
Section titled “Example Usage”# 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 namedata "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}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 CDNCacheRule
• namespace - Required String
Namespace where the CDNCacheRule 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
• 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
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 |