Skip to content
Start here

Alerting

AlertingDestinationsWebhooks

resource cloudflare_notification_policy_webhooks

required Expand Collapse
account_id: String

The account id

name: String

The name of the webhook destination. This will be included in the request body when you receive a webhook notification.

url: String

The POST endpoint to call when dispatching a notification.

optional Expand Collapse
secret?: String

Optional secret that will be passed in the cf-webhook-auth header when dispatching generic webhook notifications or formatted for supported destinations. Secrets are not returned in any API response body.

computed Expand Collapse
id: String

UUID

created_at: Time

Timestamp of when the webhook destination was created.

last_failure: Time

Timestamp of the last time an attempt to dispatch a notification to this webhook failed.

last_success: Time

Timestamp of the last time Cloudflare was able to successfully dispatch a notification using this webhook.

type: String

Type of webhook endpoint.

cloudflare_notification_policy_webhooks

resource "cloudflare_notification_policy_webhooks" "example_notification_policy_webhooks" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  name = "Slack Webhook"
  url = "https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd"
  secret = "secret"
}

data cloudflare_notification_policy_webhooks

required Expand Collapse
webhook_id: String

The unique identifier of a webhook

account_id: String

The account id

computed Expand Collapse
id: String

The unique identifier of a webhook

created_at: Time

Timestamp of when the webhook destination was created.

last_failure: Time

Timestamp of the last time an attempt to dispatch a notification to this webhook failed.

last_success: Time

Timestamp of the last time Cloudflare was able to successfully dispatch a notification using this webhook.

name: String

The name of the webhook destination. This will be included in the request body when you receive a webhook notification.

secret: String

Optional secret that will be passed in the cf-webhook-auth header when dispatching generic webhook notifications or formatted for supported destinations. Secrets are not returned in any API response body.

type: String

Type of webhook endpoint.

url: String

The POST endpoint to call when dispatching a notification.

cloudflare_notification_policy_webhooks

data "cloudflare_notification_policy_webhooks" "example_notification_policy_webhooks" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  webhook_id = "b115d5ec15c641ee8b7692c449b5227b"
}

data cloudflare_notification_policy_webhooks_list

required Expand Collapse
account_id: String

The account id

optional Expand Collapse
max_items?: Int64

Max items to fetch, default: 1000

computed Expand Collapse
result: List[Attributes]

The items returned by the data source

id: String

The unique identifier of a webhook

created_at: Time

Timestamp of when the webhook destination was created.

last_failure: Time

Timestamp of the last time an attempt to dispatch a notification to this webhook failed.

last_success: Time

Timestamp of the last time Cloudflare was able to successfully dispatch a notification using this webhook.

name: String

The name of the webhook destination. This will be included in the request body when you receive a webhook notification.

secret: String

Optional secret that will be passed in the cf-webhook-auth header when dispatching generic webhook notifications or formatted for supported destinations. Secrets are not returned in any API response body.

type: String

Type of webhook endpoint.

url: String

The POST endpoint to call when dispatching a notification.

cloudflare_notification_policy_webhooks_list

data "cloudflare_notification_policy_webhooks_list" "example_notification_policy_webhooks_list" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
}

AlertingPolicies

resource cloudflare_notification_policy

required Expand Collapse
account_id: String

The account id

alert_type: String

Refers to which event will trigger a Notification dispatch. You can use the endpoint to get available alert types which then will give you a list of possible values.

name: String

Name of the policy.

mechanisms: Attributes

List of IDs that will be used when dispatching a notification. IDs for email type will be the email address.

email?: List[Attributes]
id?: String

The email address

pagerduty?: List[Attributes]
id?: String

UUID

webhooks?: List[Attributes]
id?: String

UUID

optional Expand Collapse
alert_interval?: String

Optional specification of how often to re-alert from the same incident, not support on all alert types.

description?: String

Optional description for the Notification policy.

filters?: Attributes

Optional filters that allow you to be alerted only on a subset of events for that alert type based on some criteria. This is only available for select alert types. See alert type documentation for more details.

actions?: List[String]

Usage depends on specific alert type

affected_asns?: List[String]

Used for configuring radar_notification

affected_components?: List[String]

Used for configuring incident_alert

affected_locations?: List[String]

Used for configuring radar_notification

airport_code?: List[String]

Used for configuring maintenance_event_notification

alert_trigger_preferences?: List[String]

Usage depends on specific alert type

alert_trigger_preferences_value?: List[String]

Usage depends on specific alert type

enabled?: List[String]

Used for configuring load_balancing_pool_enablement_alert

environment?: List[String]

Used for configuring pages_event_alert

event?: List[String]

Used for configuring pages_event_alert

event_source?: List[String]

Used for configuring load_balancing_health_alert

event_type?: List[String]

Usage depends on specific alert type

group_by?: List[String]

Usage depends on specific alert type

health_check_id?: List[String]

Used for configuring health_check_status_notification

incident_impact?: List[String]

Used for configuring incident_alert

input_id?: List[String]

Used for configuring stream_live_notifications

insight_class?: List[String]

Used for configuring security_insights_alert

limit?: List[String]

Used for configuring billing_usage_alert

logo_tag?: List[String]

Used for configuring logo_match_alert

megabits_per_second?: List[String]

Used for configuring advanced_ddos_attack_l4_alert

new_health?: List[String]

Used for configuring load_balancing_health_alert

new_status?: List[String]

Used for configuring tunnel_health_event

packets_per_second?: List[String]

Used for configuring advanced_ddos_attack_l4_alert

pool_id?: List[String]

Usage depends on specific alert type

pop_names?: List[String]

Usage depends on specific alert type

product?: List[String]

Used for configuring billing_usage_alert

project_id?: List[String]

Used for configuring pages_event_alert

protocol?: List[String]

Used for configuring advanced_ddos_attack_l4_alert

query_tag?: List[String]

Usage depends on specific alert type

requests_per_second?: List[String]

Used for configuring advanced_ddos_attack_l7_alert

selectors?: List[String]

Usage depends on specific alert type

services?: List[String]

Used for configuring clickhouse_alert_fw_ent_anomaly

slo?: List[String]

Usage depends on specific alert type

status?: List[String]

Used for configuring health_check_status_notification

target_hostname?: List[String]

Used for configuring advanced_ddos_attack_l7_alert

target_ip?: List[String]

Used for configuring advanced_ddos_attack_l4_alert

target_zone_name?: List[String]

Used for configuring advanced_ddos_attack_l7_alert

traffic_exclusions?: List[String]

Used for configuring traffic_anomalies_alert

tunnel_id?: List[String]

Used for configuring tunnel_health_event

tunnel_name?: List[String]

Usage depends on specific alert type

type?: List[String]

Usage depends on specific alert type

where?: List[String]

Usage depends on specific alert type

zones?: List[String]

Usage depends on specific alert type

enabled?: Bool

Whether or not the Notification policy is enabled.

computed Expand Collapse
id: String

UUID

created: Time
modified: Time

cloudflare_notification_policy

resource "cloudflare_notification_policy" "example_notification_policy" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  alert_type = "universal_ssl_event_type"
  enabled = true
  mechanisms = {
    email = [{
      id = "id"
    }]
    pagerduty = [{
      id = "f174e90afafe4643bbbc4a0ed4fc8415"
    }]
    webhooks = [{
      id = "f174e90afafe4643bbbc4a0ed4fc8415"
    }]
  }
  name = "SSL Notification Event Policy"
  alert_interval = "30m"
  description = "Something describing the policy."
  filters = {
    actions = ["string"]
    affected_asns = ["string"]
    affected_components = ["string"]
    affected_locations = ["string"]
    airport_code = ["string"]
    alert_trigger_preferences = ["string"]
    alert_trigger_preferences_value = ["string"]
    enabled = ["string"]
    environment = ["string"]
    event = ["string"]
    event_source = ["string"]
    event_type = ["string"]
    group_by = ["string"]
    health_check_id = ["string"]
    incident_impact = ["INCIDENT_IMPACT_NONE"]
    input_id = ["string"]
    insight_class = ["string"]
    limit = ["string"]
    logo_tag = ["string"]
    megabits_per_second = ["string"]
    new_health = ["string"]
    new_status = ["string"]
    packets_per_second = ["string"]
    pool_id = ["string"]
    pop_names = ["string"]
    product = ["string"]
    project_id = ["string"]
    protocol = ["string"]
    query_tag = ["string"]
    requests_per_second = ["string"]
    selectors = ["string"]
    services = ["string"]
    slo = ["99.9"]
    status = ["string"]
    target_hostname = ["string"]
    target_ip = ["string"]
    target_zone_name = ["string"]
    traffic_exclusions = ["security_events"]
    tunnel_id = ["string"]
    tunnel_name = ["string"]
    type = ["string"]
    where = ["string"]
    zones = ["string"]
  }
}

data cloudflare_notification_policy

required Expand Collapse
policy_id: String

The unique identifier of a notification policy

account_id: String

The account id

computed Expand Collapse
id: String

The unique identifier of a notification policy

alert_interval: String

Optional specification of how often to re-alert from the same incident, not support on all alert types.

alert_type: String

Refers to which event will trigger a Notification dispatch. You can use the endpoint to get available alert types which then will give you a list of possible values.

created: Time
description: String

Optional description for the Notification policy.

enabled: Bool

Whether or not the Notification policy is enabled.

modified: Time
name: String

Name of the policy.

filters: Attributes

Optional filters that allow you to be alerted only on a subset of events for that alert type based on some criteria. This is only available for select alert types. See alert type documentation for more details.

actions: List[String]

Usage depends on specific alert type

affected_asns: List[String]

Used for configuring radar_notification

affected_components: List[String]

Used for configuring incident_alert

affected_locations: List[String]

Used for configuring radar_notification

airport_code: List[String]

Used for configuring maintenance_event_notification

alert_trigger_preferences: List[String]

Usage depends on specific alert type

alert_trigger_preferences_value: List[String]

Usage depends on specific alert type

enabled: List[String]

Used for configuring load_balancing_pool_enablement_alert

environment: List[String]

Used for configuring pages_event_alert

event: List[String]

Used for configuring pages_event_alert

event_source: List[String]

Used for configuring load_balancing_health_alert

event_type: List[String]

Usage depends on specific alert type

group_by: List[String]

Usage depends on specific alert type

health_check_id: List[String]

Used for configuring health_check_status_notification

incident_impact: List[String]

Used for configuring incident_alert

input_id: List[String]

Used for configuring stream_live_notifications

insight_class: List[String]

Used for configuring security_insights_alert

limit: List[String]

Used for configuring billing_usage_alert

logo_tag: List[String]

Used for configuring logo_match_alert

megabits_per_second: List[String]

Used for configuring advanced_ddos_attack_l4_alert

new_health: List[String]

Used for configuring load_balancing_health_alert

new_status: List[String]

Used for configuring tunnel_health_event

packets_per_second: List[String]

Used for configuring advanced_ddos_attack_l4_alert

pool_id: List[String]

Usage depends on specific alert type

pop_names: List[String]

Usage depends on specific alert type

product: List[String]

Used for configuring billing_usage_alert

project_id: List[String]

Used for configuring pages_event_alert

protocol: List[String]

Used for configuring advanced_ddos_attack_l4_alert

query_tag: List[String]

Usage depends on specific alert type

requests_per_second: List[String]

Used for configuring advanced_ddos_attack_l7_alert

selectors: List[String]

Usage depends on specific alert type

services: List[String]

Used for configuring clickhouse_alert_fw_ent_anomaly

slo: List[String]

Usage depends on specific alert type

status: List[String]

Used for configuring health_check_status_notification

target_hostname: List[String]

Used for configuring advanced_ddos_attack_l7_alert

target_ip: List[String]

Used for configuring advanced_ddos_attack_l4_alert

target_zone_name: List[String]

Used for configuring advanced_ddos_attack_l7_alert

traffic_exclusions: List[String]

Used for configuring traffic_anomalies_alert

tunnel_id: List[String]

Used for configuring tunnel_health_event

tunnel_name: List[String]

Usage depends on specific alert type

type: List[String]

Usage depends on specific alert type

where: List[String]

Usage depends on specific alert type

zones: List[String]

Usage depends on specific alert type

mechanisms: Attributes

List of IDs that will be used when dispatching a notification. IDs for email type will be the email address.

email: List[Attributes]
id: String

The email address

pagerduty: List[Attributes]
id: String

UUID

webhooks: List[Attributes]
id: String

UUID

cloudflare_notification_policy

data "cloudflare_notification_policy" "example_notification_policy" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  policy_id = "0da2b59ef118439d8097bdfb215203c9"
}

data cloudflare_notification_policies

required Expand Collapse
account_id: String

The account id

optional Expand Collapse
max_items?: Int64

Max items to fetch, default: 1000

computed Expand Collapse
result: List[Attributes]

The items returned by the data source

id: String

The unique identifier of a notification policy

alert_interval: String

Optional specification of how often to re-alert from the same incident, not support on all alert types.

alert_type: String

Refers to which event will trigger a Notification dispatch. You can use the endpoint to get available alert types which then will give you a list of possible values.

created: Time
description: String

Optional description for the Notification policy.

enabled: Bool

Whether or not the Notification policy is enabled.

filters: Attributes

Optional filters that allow you to be alerted only on a subset of events for that alert type based on some criteria. This is only available for select alert types. See alert type documentation for more details.

actions: List[String]

Usage depends on specific alert type

affected_asns: List[String]

Used for configuring radar_notification

affected_components: List[String]

Used for configuring incident_alert

affected_locations: List[String]

Used for configuring radar_notification

airport_code: List[String]

Used for configuring maintenance_event_notification

alert_trigger_preferences: List[String]

Usage depends on specific alert type

alert_trigger_preferences_value: List[String]

Usage depends on specific alert type

enabled: List[String]

Used for configuring load_balancing_pool_enablement_alert

environment: List[String]

Used for configuring pages_event_alert

event: List[String]

Used for configuring pages_event_alert

event_source: List[String]

Used for configuring load_balancing_health_alert

event_type: List[String]

Usage depends on specific alert type

group_by: List[String]

Usage depends on specific alert type

health_check_id: List[String]

Used for configuring health_check_status_notification

incident_impact: List[String]

Used for configuring incident_alert

input_id: List[String]

Used for configuring stream_live_notifications

insight_class: List[String]

Used for configuring security_insights_alert

limit: List[String]

Used for configuring billing_usage_alert

logo_tag: List[String]

Used for configuring logo_match_alert

megabits_per_second: List[String]

Used for configuring advanced_ddos_attack_l4_alert

new_health: List[String]

Used for configuring load_balancing_health_alert

new_status: List[String]

Used for configuring tunnel_health_event

packets_per_second: List[String]

Used for configuring advanced_ddos_attack_l4_alert

pool_id: List[String]

Usage depends on specific alert type

pop_names: List[String]

Usage depends on specific alert type

product: List[String]

Used for configuring billing_usage_alert

project_id: List[String]

Used for configuring pages_event_alert

protocol: List[String]

Used for configuring advanced_ddos_attack_l4_alert

query_tag: List[String]

Usage depends on specific alert type

requests_per_second: List[String]

Used for configuring advanced_ddos_attack_l7_alert

selectors: List[String]

Usage depends on specific alert type

services: List[String]

Used for configuring clickhouse_alert_fw_ent_anomaly

slo: List[String]

Usage depends on specific alert type

status: List[String]

Used for configuring health_check_status_notification

target_hostname: List[String]

Used for configuring advanced_ddos_attack_l7_alert

target_ip: List[String]

Used for configuring advanced_ddos_attack_l4_alert

target_zone_name: List[String]

Used for configuring advanced_ddos_attack_l7_alert

traffic_exclusions: List[String]

Used for configuring traffic_anomalies_alert

tunnel_id: List[String]

Used for configuring tunnel_health_event

tunnel_name: List[String]

Usage depends on specific alert type

type: List[String]

Usage depends on specific alert type

where: List[String]

Usage depends on specific alert type

zones: List[String]

Usage depends on specific alert type

mechanisms: Attributes

List of IDs that will be used when dispatching a notification. IDs for email type will be the email address.

email: List[Attributes]
id: String

The email address

pagerduty: List[Attributes]
id: String

UUID

webhooks: List[Attributes]
id: String

UUID

modified: Time
name: String

Name of the policy.

cloudflare_notification_policies

data "cloudflare_notification_policies" "example_notification_policies" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
}