Skip to content

xcsh_app_firewall (Data Source)

Retrieves information about Application Firewall in F5 Distributed Cloud. This is a read-only data source.

~> Note: For more information, see the App Firewall API documentation.

# AppFirewall Data Source Example
terraform {
required_version = ">= 1.0"
required_providers {
xcsh = {
source = "f5-sales-demo/xcsh"
version = ">= 0.1.0"
}
}
}
# Look up an existing AppFirewall by name
data "xcsh_app_firewall" "example" {
name = "example-app-firewall"
namespace = "staging"
}
output "app_firewall_id" {
value = data.xcsh_app_firewall.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.

Required fields:

  • name
  • namespace

Example (API format):

apiVersion: v1
kind: app_firewall
metadata:
name: default-waf
namespace: demo-app
spec:
blocking: {}

• name - Required String
Name of the AppFirewall

• namespace - Required String
Namespace where the AppFirewall exists

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

• allow_all_response_codes - Optional Object Defaults to map[]
Configuration parameter for allow all response codes. Server applies default when omitted

• allowed_response_codes - Optional String
List of HTTP response status codes that are allowed

• annotations - Optional Map
Annotations applied to this resource

• blocking - Optional Object
Enable this option

• blocking_page - Optional String
Custom Blocking Response Page. Custom blocking response page body

• bot_protection_setting - Optional String
Configuration parameter for bot protection setting

• custom_anonymization - Optional String
Anonymization settings which is a list of HTTP headers, parameters and cookies

• default_anonymization - Optional Object Defaults to map[]
Configuration parameter for default anonymization. Server applies default when omitted

• default_bot_setting - Optional Object Defaults to map[]
Configuration parameter for default bot setting. Server applies default when omitted

• default_detection_settings - Optional Object Defaults to map[]
Configuration parameter for default detection settings. Server applies default when omitted

• description - Optional String
Description of the AppFirewall

• detection_settings - Optional String
Specifies detection settings to be used by WAF

• disable_ai_enhancements - Optional Object Defaults to map[]
Configuration parameter for disable ai enhancements. Server applies default when omitted

• disable_anonymization - Optional Object
Configuration parameter for disable anonymization

• enable_ai_enhancements - Optional String
Actions complimented by the additional intelligence of the F5 AI Powered Risk-based analysis

• id - Optional String
Unique identifier for the resource

• labels - Optional Map
Labels applied to this resource

• monitoring - Optional Object Defaults to map[]
Enable this option. Server applies default when omitted

• use_default_blocking_page - Optional Object Defaults to map[]
Enable this option. Server applies default when omitted

• response_code - Optional List
List of HTTP response status codes that are allowed


A blocking block supports the following:

A blocking_page block supports the following:

• blocking_page - Optional String
Define the content of the response page (e.g., an HTML document or a JSON object), use the {{request_id}} placeholder to provide users with a unique identifier to be able to trace the blocked request in the logs. The maximum allowed size of response body is 4096 bytes after base64 encoding

• response_code - Optional String Defaults to EmptyStatusCode
Possible values are EmptyStatusCode, Continue, OK, Created, Accepted, NonAuthoritativeInformation, NoContent, ResetContent, PartialContent, MultiStatus, AlreadyReported, IMUsed, MultipleChoices, MovedPermanently, Found, SeeOther, NotModified, UseProxy, TemporaryRedirect, PermanentRedirect, BadRequest, Unauthorized, PaymentRequired, Forbidden, NotFound, MethodNotAllowed, NotAcceptable, ProxyAuthenticationRequired, RequestTimeout, Conflict, Gone, LengthRequired, PreconditionFailed, PayloadTooLarge, URITooLong, UnsupportedMediaType, RangeNotSatisfiable, ExpectationFailed, MisdirectedRequest, UnprocessableEntity, Locked, FailedDependency, UpgradeRequired, PreconditionRequired, TooManyRequests, RequestHeaderFieldsTooLarge, InternalServerError, NotImplemented, BadGateway, ServiceUnavailable, GatewayTimeout, HTTPVersionNotSupported, VariantAlsoNegotiates, InsufficientStorage, LoopDetected, NotExtended, NetworkAuthenticationRequired
[Enum: EmptyStatusCode|Continue|OK|Created|Accepted|NonAuthoritativeInformation|NoContent|ResetContent|PartialContent|MultiStatus|AlreadyReported|IMUsed|MultipleChoices|MovedPermanently|Found|SeeOther|NotModified|UseProxy|TemporaryRedirect|PermanentRedirect|BadRequest|Unauthorized|PaymentRequired|Forbidden|NotFound|MethodNotAllowed|NotAcceptable|ProxyAuthenticationRequired|RequestTimeout|Conflict|Gone|LengthRequired|PreconditionFailed|PayloadTooLarge|URITooLong|UnsupportedMediaType|RangeNotSatisfiable|ExpectationFailed|MisdirectedRequest|UnprocessableEntity|Locked|FailedDependency|UpgradeRequired|PreconditionRequired|TooManyRequests|RequestHeaderFieldsTooLarge|InternalServerError|NotImplemented|BadGateway|ServiceUnavailable|GatewayTimeout|HTTPVersionNotSupported|VariantAlsoNegotiates|InsufficientStorage|LoopDetected|NotExtended|NetworkAuthenticationRequired] HTTP response status codes EmptyStatusCode response codes means it is not specified Continue status code OK status code Created status code Accepted status code Non Authoritative Information status code No Content status code Reset Content status code Partial Content status code Multi Status

A bot_protection_setting block supports the following:

• good_bot_action - Optional String Defaults to BLOCK
Possible values are BLOCK, REPORT, IGNORE
[Enum: BLOCK|REPORT|IGNORE] Action to be performed on the request Log and block Log only Disable detection

• malicious_bot_action - Optional String Defaults to BLOCK
Possible values are BLOCK, REPORT, IGNORE
[Enum: BLOCK|REPORT|IGNORE] Action to be performed on the request Log and block Log only Disable detection

• suspicious_bot_action - Optional String Defaults to BLOCK
Possible values are BLOCK, REPORT, IGNORE
[Enum: BLOCK|REPORT|IGNORE] Action to be performed on the request Log and block Log only Disable detection

A custom_anonymization block supports the following:

• anonymization_config - Optional List
List of HTTP headers, cookies and query parameters whose values will be masked

An anonymization_config block (within custom_anonymization) supports the following:

• cookie - Optional String
Configure anonymization for HTTP Cookies

• http_header - Optional String
Configure anonymization for HTTP Headers

• query_parameter - Optional String
Configure anonymization for HTTP Parameters

Section titled “Custom Anonymization Anonymization Config Cookie”

A cookie block (within custom_anonymization.anonymization_config) supports the following:

• cookie_name - Optional String
Masks the cookie value. The setting does not mask the cookie name. Wildcard matching can be used by prefixing or suffixing the cookie name with a wildcard asterisk (*), or by using only an asterisk to match any cookie name

Custom Anonymization Anonymization Config HTTP Header

Section titled “Custom Anonymization Anonymization Config HTTP Header”

A http_header block (within custom_anonymization.anonymization_config) supports the following:

• header_name - Optional String
Masks the HTTP header value. The setting does not mask the HTTP header name. Wildcard matching can be used by prefixing or suffixing the HTTP header name with a wildcard asterisk (*), or by using only an asterisk to match any HTTP header name

Custom Anonymization Anonymization Config Query Parameter

Section titled “Custom Anonymization Anonymization Config Query Parameter”

A query_parameter block (within custom_anonymization.anonymization_config) supports the following:

• query_param_name - Optional String
Masks the query parameter value. The setting does not mask the query parameter name. Wildcard matching can be used by prefixing or suffixing the query parameter name with a wildcard asterisk (*), or by using only an asterisk to match any query parameter name

A default_anonymization block supports the following:

A default_bot_setting block supports the following:

A default_detection_settings block supports the following:

A detection_settings block supports the following:

• bot_protection_setting - Optional String
Configuration parameter for bot protection setting

• default_bot_setting - Optional Object
Configuration parameter for default bot setting

• default_violation_settings - Optional Object
Configuration parameter for default violation settings

• disable_staging - Optional Object
Enable this option

• disable_suppression - Optional Object
Configuration parameter for disable suppression

• disable_threat_campaigns - Optional Object
Enable this option

• enable_suppression - Optional Object
Configuration parameter for enable suppression

• enable_threat_campaigns - Optional Object
Enable this option

• signature_selection_setting - Optional String
Attack Signatures are patterns that identify attacks on a web application and its components

• stage_new_and_updated_signatures - Optional String
Attack Signatures staging configuration

• stage_new_signatures - Optional String
Attack Signatures staging configuration

• violation_settings - Optional String
Specifies violation settings to be used by WAF

• violations_view - Optional List
List of violation checks that are performed on HTTP request to ensure the requests are properly formatted, detection of evasion techniques and other violations

A bot_protection_setting block (within detection_settings) supports the following:

• good_bot_action - Optional String Defaults to BLOCK
Possible values are BLOCK, REPORT, IGNORE
[Enum: BLOCK|REPORT|IGNORE] Action to be performed on the request Log and block Log only Disable detection

• malicious_bot_action - Optional String Defaults to BLOCK
Possible values are BLOCK, REPORT, IGNORE
[Enum: BLOCK|REPORT|IGNORE] Action to be performed on the request Log and block Log only Disable detection

• suspicious_bot_action - Optional String Defaults to BLOCK
Possible values are BLOCK, REPORT, IGNORE
[Enum: BLOCK|REPORT|IGNORE] Action to be performed on the request Log and block Log only Disable detection

A default_bot_setting block (within detection_settings) supports the following:

Detection Settings Default Violation Settings

Section titled “Detection Settings Default Violation Settings”

A default_violation_settings block (within detection_settings) supports the following:

A disable_staging block (within detection_settings) supports the following:

A disable_suppression block (within detection_settings) supports the following:

Detection Settings Disable Threat Campaigns

Section titled “Detection Settings Disable Threat Campaigns”

A disable_threat_campaigns block (within detection_settings) supports the following:

An enable_suppression block (within detection_settings) supports the following:

Detection Settings Enable Threat Campaigns

Section titled “Detection Settings Enable Threat Campaigns”

An enable_threat_campaigns block (within detection_settings) supports the following:

Detection Settings Signature Selection Setting

Section titled “Detection Settings Signature Selection Setting”

A signature_selection_setting block (within detection_settings) supports the following:

• attack_type_settings - Optional String
Specifies attack-type settings to be used by WAF

• default_attack_type_settings - Optional Object
Configuration parameter for default attack type settings

• high_medium_accuracy_signatures - Optional Object
Configuration parameter for high medium accuracy signatures

• high_medium_low_accuracy_signatures - Optional Object
Configuration parameter for high medium low accuracy signatures

• only_high_accuracy_signatures - Optional Object
Configuration parameter for only high accuracy signatures

Detection Settings Signature Selection Setting Attack Type Settings

Section titled “Detection Settings Signature Selection Setting Attack Type Settings”

Deeply nested Settings block collapsed for readability.

Detection Settings Signature Selection Setting Default Attack Type Settings

Section titled “Detection Settings Signature Selection Setting Default Attack Type Settings”

Deeply nested Settings block collapsed for readability.

Detection Settings Signature Selection Setting High Medium Accuracy Signatures

Section titled “Detection Settings Signature Selection Setting High Medium Accuracy Signatures”

Deeply nested Signatures block collapsed for readability.

Detection Settings Signature Selection Setting High Medium Low Accuracy Signatures

Section titled “Detection Settings Signature Selection Setting High Medium Low Accuracy Signatures”

Deeply nested Signatures block collapsed for readability.

Detection Settings Signature Selection Setting Only High Accuracy Signatures

Section titled “Detection Settings Signature Selection Setting Only High Accuracy Signatures”

Deeply nested Signatures block collapsed for readability.

Detection Settings Stage New And Updated Signatures

Section titled “Detection Settings Stage New And Updated Signatures”

A stage_new_and_updated_signatures block (within detection_settings) supports the following:

• staging_period - Optional Number
Define staging period in days. The default staging period is 7 days and the max supported staging period is 20 days

A stage_new_signatures block (within detection_settings) supports the following:

• staging_period - Optional Number
Define staging period in days. The default staging period is 7 days and the max supported staging period is 20 days

A violation_settings block (within detection_settings) supports the following:

• disabled_violation_types - Optional List Defaults to VIOL_NONE
Possible values are VIOL_NONE, VIOL_FILETYPE, VIOL_METHOD, VIOL_MANDATORY_HEADER, VIOL_HTTP_RESPONSE_STATUS, VIOL_REQUEST_MAX_LENGTH, VIOL_FILE_UPLOAD, VIOL_FILE_UPLOAD_IN_BODY, VIOL_XML_MALFORMED, VIOL_JSON_MALFORMED, VIOL_ASM_COOKIE_MODIFIED, VIOL_HTTP_PROTOCOL_MULTIPLE_HOST_HEADERS, VIOL_HTTP_PROTOCOL_BAD_HOST_HEADER_VALUE, VIOL_HTTP_PROTOCOL_UNPARSABLE_REQUEST_CONTENT, VIOL_HTTP_PROTOCOL_NULL_IN_REQUEST, VIOL_HTTP_PROTOCOL_BAD_HTTP_VERSION, VIOL_HTTP_PROTOCOL_SEVERAL_CONTENT_LENGTH_HEADERS, VIOL_EVASION_DIRECTORY_TRAVERSALS, VIOL_MALFORMED_REQUEST, VIOL_EVASION_MULTIPLE_DECODING, VIOL_DATA_GUARD, VIOL_EVASION_APACHE_WHITESPACE, VIOL_COOKIE_MODIFIED, VIOL_EVASION_IIS_UNICODE_CODEPOINTS, VIOL_EVASION_IIS_BACKSLASHES, VIOL_EVASION_PERCENT_U_DECODING, VIOL_EVASION_BARE_BYTE_DECODING, VIOL_EVASION_BAD_UNESCAPE, VIOL_HTTP_PROTOCOL_BODY_IN_GET_OR_HEAD_REQUEST, VIOL_ENCODING, VIOL_COOKIE_MALFORMED, VIOL_GRAPHQL_FORMAT, VIOL_GRAPHQL_MALFORMED, VIOL_GRAPHQL_INTROSPECTION_QUERY
[Enum: VIOL_NONE|VIOL_FILETYPE|VIOL_METHOD|VIOL_MANDATORY_HEADER|VIOL_HTTP_RESPONSE_STATUS|VIOL_REQUEST_MAX_LENGTH|VIOL_FILE_UPLOAD|VIOL_FILE_UPLOAD_IN_BODY|VIOL_XML_MALFORMED|VIOL_JSON_MALFORMED|VIOL_ASM_COOKIE_MODIFIED|VIOL_HTTP_PROTOCOL_MULTIPLE_HOST_HEADERS|VIOL_HTTP_PROTOCOL_BAD_HOST_HEADER_VALUE|VIOL_HTTP_PROTOCOL_UNPARSABLE_REQUEST_CONTENT|VIOL_HTTP_PROTOCOL_NULL_IN_REQUEST|VIOL_HTTP_PROTOCOL_BAD_HTTP_VERSION|VIOL_HTTP_PROTOCOL_SEVERAL_CONTENT_LENGTH_HEADERS|VIOL_EVASION_DIRECTORY_TRAVERSALS|VIOL_MALFORMED_REQUEST|VIOL_EVASION_MULTIPLE_DECODING|VIOL_DATA_GUARD|VIOL_EVASION_APACHE_WHITESPACE|VIOL_COOKIE_MODIFIED|VIOL_EVASION_IIS_UNICODE_CODEPOINTS|VIOL_EVASION_IIS_BACKSLASHES|VIOL_EVASION_PERCENT_U_DECODING|VIOL_EVASION_BARE_BYTE_DECODING|VIOL_EVASION_BAD_UNESCAPE|VIOL_HTTP_PROTOCOL_BODY_IN_GET_OR_HEAD_REQUEST|VIOL_ENCODING|VIOL_COOKIE_MALFORMED|VIOL_GRAPHQL_FORMAT|VIOL_GRAPHQL_MALFORMED|VIOL_GRAPHQL_INTROSPECTION_QUERY] Disabled Violations. List of violations to be excluded

A violations_view block (within detection_settings) supports the following:

• description_spec - Optional String
Description. Human-readable description text

• enabled - Optional Bool
State. Enable or disable the feature

• enabled_by_default - Optional String
Violations that are enabled by default by F5 are advisable to leave enabled

• name - Optional String
Name. Human-readable name for the resource

• title - Optional String
Title. Human-readable title for the resource

A disable_ai_enhancements block supports the following:

A disable_anonymization block supports the following:

An enable_ai_enhancements block supports the following:

• mitigate_high_medium_risk_action - Optional Object
Enable this option

• mitigate_high_risk_action - Optional Object
Enable this option

Enable Ai Enhancements Mitigate High Medium Risk Action

Section titled “Enable Ai Enhancements Mitigate High Medium Risk Action”

Deeply nested Action block collapsed for readability.

Enable Ai Enhancements Mitigate High Risk Action

Section titled “Enable Ai Enhancements Mitigate High Risk Action”

A mitigate_high_risk_action block (within enable_ai_enhancements) supports the following:


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