Skip to content
Start here

Precursor

resource cloudflare_precursor

required Expand Collapse
zone_id: String

Identifier.

optional Expand Collapse
show_interstitial?: Bool

Whether Precursor shows an interstitial when it takes action on a request.

mode?: String

Controls Precursor detection for the zone. off disables detection, monitor records detections without affecting bot scores, and arm allows detections to affect bot scores.

rules?: List[Attributes]

The ordered list of Precursor rules for the zone.

expression: String

The filter expression that determines which requests the rule matches.

show_interstitial: Bool

Whether Precursor shows an interstitial when it takes action on a request.

id: String

The read-only identifier that Cloudflare assigns to the rule.

description?: String

An informative description of the rule.

enabled?: Bool

Whether the rule is active.

computed Expand Collapse
id: String

Identifier.

cloudflare_precursor

resource "cloudflare_precursor" "example_precursor" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  mode = "monitor"
  rules = [{
    expression = "http.request.uri.path eq \"/login\""
    show_interstitial = true
    description = "Show an interstitial on the login path"
    enabled = true
  }]
  show_interstitial = true
}

data cloudflare_precursor

required Expand Collapse
zone_id: String

Identifier.

computed Expand Collapse
id: String

Identifier.

mode: String

Controls Precursor detection for the zone. off disables detection, monitor records detections without affecting bot scores, and arm allows detections to affect bot scores.

show_interstitial: Bool

Whether Precursor shows an interstitial when it takes action on a request.

rules: List[Attributes]

The ordered list of Precursor rules for the zone.

expression: String

The filter expression that determines which requests the rule matches.

show_interstitial: Bool

Whether Precursor shows an interstitial when it takes action on a request.

id: String

The read-only identifier that Cloudflare assigns to the rule.

description: String

An informative description of the rule.

enabled: Bool

Whether the rule is active.

cloudflare_precursor

data "cloudflare_precursor" "example_precursor" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
}