Skip to content

f5xc_alert_policy Resource - terraform-provider-f5xc

Manages new Alert Policy Object. in F5 Distributed Cloud.

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

# Alert Policy Resource Example
# Manages new Alert Policy Object. in F5 Distributed Cloud.
terraform {
required_version = ">= 1.0"
required_providers {
f5xc = {
source = "f5xc-salesdemos/f5xc"
version = ">= 0.1.0"
}
}
}
# Basic Alert Policy configuration
resource "f5xc_alert_policy" "example" {
name = "example-alert-policy"
namespace = "staging"
labels = {
environment = "production"
managed_by = "terraform"
}
annotations = {
"owner" = "platform-team"
}
# Alert Policy configuration
# Alert receivers
receivers {
name = "slack-receiver"
namespace = "staging"
}
# Alert routes
routes {
any {}
send {}
}
# Notification parameters
notification_parameters {
default {}
group_wait = "30s"
group_interval = "1m"
}
}

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

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

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

notification_parameters - Optional Block Defaults to null
Set of notification parameters to decide how and when the alert notifications should be sent to the receivers
See Notification Parameters below for details.

receivers - Optional Block
List of Alert Receivers where the alerts will be sent
See Receivers below for details.

routes - Optional Block
Set of routes to match the incoming alert. The routes are evaluated in the specified order and terminates on the first match
See Routes 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


A notification_parameters block supports the following:

custom - Optional Block
Specify list of custom labels to group/aggregate the alerts
See Custom below.

default - Optional Block
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 Block
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 Block
Configuration parameter for ves io group

A custom block (within notification_parameters) supports the following:

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
[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] List of Alert Names Customer tunnel interface down Physical Interface down Tunnel Interfaces to Customer Site Down Virutal 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 Block
Enable this option

custom - Optional Block
Set of matchers an alert has to fulfill to match the route
See Custom below.

dont_send - Optional Block
Enable this option

group - Optional Block
Select one or more known group names to match the incoming alert
See Group below.

notification_parameters - Optional Block
Set of notification parameters to decide how and when the alert notifications should be sent to the receivers
See Notification Parameters below.

send - Optional Block
Enable this option

severity - Optional Block
Select one or more severity levels to match the incoming alert
See Severity below.

A custom block (within routes) supports the following:

alertlabel - Optional Block
AlertLabel to configure the alert policy rule

alertname - Optional Block
Label Matcher
See Alertname below.

group - Optional Block
Label Matcher
See Group below.

severity - Optional Block
Label Matcher
See Severity below.

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 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 Block
Specify list of custom labels to group/aggregate the alerts
See Custom below.

default - Optional Block
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 Block
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 Block
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 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

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