» cloudflare_waf_packages

Use this data source to look up WAF Rule Packages.

» Example Usage

The example below matches all high sensitivity WAF Rule Packages, with a challenge action mode and an anomaly detection mode, that contain the word example. The matched WAF Rule Packages are then returned as output.

data "cloudflare_waf_packages" "test" {
  filter {
    name   = ".*example.*"
    detection_mode = "anomaly"
    sensitivity = "high"
    action_mode = "challenge"
  }
}

output "waf_packages" {
  value = data.cloudflare_waf_packages.test.packages
}

» Argument Reference

  • zone_id - (Required) The ID of the DNS zone in which to search for the WAF Rule Packages.
  • filter - (Optional) One or more values used to look up WAF Rule Packages. If more than one value is given all values must match in order to be included, see below for full list.

filter

  • name - (Optional) A regular expression matching the name of the WAF Rule Packages to lookup.
  • detection_mode - (Optional) Detection mode of the WAF Rule Packages to lookup.
  • sensitivity - (Optional) Sensitivity of the WAF Rule Packages to lookup. Valid values: high, medium, low and off.
  • action_mode - (Optional) Action mode of the WAF Rule Packages to lookup. Valid values: simulate, block and challenge.

» Attributes Reference

  • packages - A map of WAF Rule Packages details. Full list below:

packages