Skip to content

xcsh_alert_policy (Data Source)

Retrieves information about new Alert Policy Object in F5 Distributed Cloud. This is a read-only data source.

~> Note: For more information, see the Alert Policy API documentation.

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

• namespace - Required String
Namespace where the AlertPolicy exists

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 AlertPolicy

• id - Optional String
Unique identifier for the resource

• labels - Optional Map
Labels applied to this resource

• notification_parameters - Optional String Defaults to null
Set of notification parameters to decide how and when the alert notifications should be sent to the receivers

• receivers - Optional List
List of Alert Receivers where the alerts will be sent

• routes - Optional List
Set of routes to match the incoming alert. The routes are evaluated in the specified order and terminates on the first match

• custom - Optional String
Specify list of custom labels to group/aggregate the alerts

• default - Optional Object
Enable this option

• group_interval - Optional String
Group Interval is used to specify how long to wait before sending a notification about new alerts that are added to the group for which an initial notification has already been sent. Format: [0-9][smhd], where s - seconds, m - minutes, h - hours, d - days If not specified, group_interval

• group_wait - Optional String
Time value used to specify how long to initially wait for an inhibiting alert to arrive or collect more alerts for the same group. Format: [0-9][smhd], where s - seconds, m - minutes, h - hours, d - days If not specified, group_wait defaults to ’30s’

• individual - Optional Object
Enable this option

• repeat_interval - Optional String
Repeat Interval is used to specify how long to wait before sending a notification again if it has already been sent successfully. Format: [0-9][smhd], where s - seconds, m - minutes, h - hours, d - days If not specified, group_interval defaults to ‘4h’

• ves_io_group - Optional Object
Configuration parameter for ves io group

• labels - Optional List
Name of labels to group/aggregate the alerts


A receivers block 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 routes block supports the following:

• alertname - Optional String Defaults to SITE_CUSTOMER_TUNNEL_INTERFACE_DOWN
Possible values are SITE_CUSTOMER_TUNNEL_INTERFACE_DOWN, SITE_PHYSICAL_INTERFACE_DOWN, TUNNELS_TO_CUSTOMER_SITE_DOWN, SERVICE_SERVER_ERROR, SERVICE_CLIENT_ERROR, SERVICE_HEALTH_LOW, SERVICE_UNAVAILABLE, SERVICE_SERVER_ERROR_PER_SOURCE_SITE, SERVICE_CLIENT_ERROR_PER_SOURCE_SITE, SERVICE_ENDPOINT_HEALTHCHECK_FAILURE, SYNTHETIC_MONITOR_HEALTH_CRITICAL, MALICIOUS_USER_DETECTED, WAF_TOO_MANY_ATTACKS, API_SECURITY_TOO_MANY_ATTACKS, SERVICE_POLICY_TOO_MANY_ATTACKS, WAF_TOO_MANY_MALICIOUS_BOTS, BOT_DEFENSE_TOO_MANY_SECURITY_EVENTS, THREAT_CAMPAIGN, VES_CLIENT_SIDE_DEFENSE_SUSPICIOUS_DOMAIN, VES_CLIENT_SIDE_DEFENSE_SENSITIVE_FIELD_READ, TLS_AUTOMATIC_CERTIFICATE_RENEWAL_FAILURE, TLS_AUTOMATIC_CERTIFICATE_RENEWAL_STILL_FAILING, TLS_AUTOMATIC_CERTIFICATE_EXPIRED, TLS_CUSTOM_CERTIFICATE_EXPIRING, TLS_CUSTOM_CERTIFICATE_EXPIRING_SOON, TLS_CUSTOM_CERTIFICATE_EXPIRED, L7DDOS, DNS_ZONE_IGNORED_DUPLICATE_RECORD, API_SECURITY_UNUSED_API_DETECTED, API_SECURITY_SHADOW_API_DETECTED, API_SECURITY_SENSITIVE_DATA_IN_RESPONSE_DETECTED, API_SECURITY_RISK_SCORE_HIGH_DETECTED, ROUTED_DDOS_ALERT_NOTIFICATION, ROUTED_DDOS_MITIGATION_NOTIFICATION, ROUTED_DDOS_TUNNEL_STATUS_UPDATE_NOTIFICATION
[Enum: SITE_CUSTOMER_TUNNEL_INTERFACE_DOWN|SITE_PHYSICAL_INTERFACE_DOWN|TUNNELS_TO_CUSTOMER_SITE_DOWN|SERVICE_SERVER_ERROR|SERVICE_CLIENT_ERROR|SERVICE_HEALTH_LOW|SERVICE_UNAVAILABLE|SERVICE_SERVER_ERROR_PER_SOURCE_SITE|SERVICE_CLIENT_ERROR_PER_SOURCE_SITE|SERVICE_ENDPOINT_HEALTHCHECK_FAILURE|SYNTHETIC_MONITOR_HEALTH_CRITICAL|MALICIOUS_USER_DETECTED|WAF_TOO_MANY_ATTACKS|API_SECURITY_TOO_MANY_ATTACKS|SERVICE_POLICY_TOO_MANY_ATTACKS|WAF_TOO_MANY_MALICIOUS_BOTS|BOT_DEFENSE_TOO_MANY_SECURITY_EVENTS|THREAT_CAMPAIGN|VES_CLIENT_SIDE_DEFENSE_SUSPICIOUS_DOMAIN|VES_CLIENT_SIDE_DEFENSE_SENSITIVE_FIELD_READ|TLS_AUTOMATIC_CERTIFICATE_RENEWAL_FAILURE|TLS_AUTOMATIC_CERTIFICATE_RENEWAL_STILL_FAILING|TLS_AUTOMATIC_CERTIFICATE_EXPIRED|TLS_CUSTOM_CERTIFICATE_EXPIRING|TLS_CUSTOM_CERTIFICATE_EXPIRING_SOON|TLS_CUSTOM_CERTIFICATE_EXPIRED|L7DDOS|DNS_ZONE_IGNORED_DUPLICATE_RECORD|API_SECURITY_UNUSED_API_DETECTED|API_SECURITY_SHADOW_API_DETECTED|API_SECURITY_SENSITIVE_DATA_IN_RESPONSE_DETECTED|API_SECURITY_RISK_SCORE_HIGH_DETECTED|ROUTED_DDOS_ALERT_NOTIFICATION|ROUTED_DDOS_MITIGATION_NOTIFICATION|ROUTED_DDOS_TUNNEL_STATUS_UPDATE_NOTIFICATION] List of Alert Names Customer tunnel interface down Physical Interface down Tunnel Interfaces to Customer Site Down Virtual Host server error Virtual Host client error Service Health Low Service Unavailable Virtual Host server error Virtual Host client error Endpoint Healthcheck failure Synthetic

• alertname_regex - Optional String
Regular Expression match for the alertname

• any - Optional Object
Enable this option

• custom - Optional String
Set of matchers an alert has to fulfill to match the route

• dont_send - Optional Object
Enable this option

• group - Optional String
Select one or more known group names to match the incoming alert

• notification_parameters - Optional String
Set of notification parameters to decide how and when the alert notifications should be sent to the receivers

• send - Optional Object
Enable this option

• severity - Optional String
Select one or more severity levels to match the incoming alert

A custom block (within routes) supports the following:

• alertlabel - Optional String
AlertLabel to configure the alert policy rule

• alertname - Optional String
Label Matcher

• group - Optional String
Label Matcher

• severity - Optional String
Label Matcher

An alertname block (within routes.custom) supports the following:

• exact_match - Optional String
Equality match value for the label

• regex_match - Optional String
Regular expression match value for the label

A group block (within routes.custom) supports the following:

• exact_match - Optional String
Equality match value for the label

• regex_match - Optional String
Regular expression match value for the label

A severity block (within routes.custom) supports the following:

• exact_match - Optional String
Equality match value for the label

• regex_match - Optional String
Regular expression match value for the label

A dont_send block (within routes) supports the following:

A group block (within routes) supports the following:

• groups - Optional List Defaults to INFRASTRUCTURE
Possible values are INFRASTRUCTURE, IAAS_CAAS, VIRTUAL_HOST, VOLT_SHARE, UAM, SECURITY, TIMESERIES_ANOMALY, SHAPE_SECURITY, SECURITY_CSD, CDN, SYNTHETIC_MONITORS, TLS, SECURITY_BOT_DEFENSE, CLOUD_LINK, DNS, ROUTED_DDOS
[Enum: INFRASTRUCTURE|IAAS_CAAS|VIRTUAL_HOST|VOLT_SHARE|UAM|SECURITY|TIMESERIES_ANOMALY|SHAPE_SECURITY|SECURITY_CSD|CDN|SYNTHETIC_MONITORS|TLS|SECURITY_BOT_DEFENSE|CLOUD_LINK|DNS|ROUTED_DDOS] Groups. Name of groups to match the alert

A notification_parameters block (within routes) supports the following:

• custom - Optional String
Specify list of custom labels to group/aggregate the alerts

• default - Optional Object
Enable this option

• group_interval - Optional String
Group Interval is used to specify how long to wait before sending a notification about new alerts that are added to the group for which an initial notification has already been sent. Format: [0-9][smhd], where s - seconds, m - minutes, h - hours, d - days If not specified, group_interval

• group_wait - Optional String
Time value used to specify how long to initially wait for an inhibiting alert to arrive or collect more alerts for the same group. Format: [0-9][smhd], where s - seconds, m - minutes, h - hours, d - days If not specified, group_wait defaults to ’30s’

• individual - Optional Object
Enable this option

• repeat_interval - Optional String
Repeat Interval is used to specify how long to wait before sending a notification again if it has already been sent successfully. Format: [0-9][smhd], where s - seconds, m - minutes, h - hours, d - days If not specified, group_interval defaults to ‘4h’

• ves_io_group - Optional Object
Configuration parameter for ves io group

A custom block (within routes.notification_parameters) supports the following:

• labels - Optional List
Name of labels to group/aggregate the alerts

A default block (within routes.notification_parameters) supports the following:

An individual block (within routes.notification_parameters) supports the following:

Routes Notification Parameters Ves Io Group

Section titled “Routes Notification Parameters Ves Io Group”

A ves_io_group block (within routes.notification_parameters) supports the following:

A severity block (within routes) supports the following:

• severities - Optional List Defaults to MINOR
Possible values are MINOR, MAJOR, CRITICAL
[Enum: MINOR|MAJOR|CRITICAL] Severities. List of severity levels


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