Skip to content
Start here

Precursor

resource cloudflare_precursor

required Expand Collapse
zone_id: String

Identifier.

optional Expand Collapse
default_mode?: String

The zone-level Precursor enforcement mode applied to requests that do not match a more specific enforcement rule.

enforcement_rules?: List[Attributes]

The ordered list of enforcement rules for the zone.

expression: String

The filter expression that determines which requests the rule matches.

mode: String

The override mode Precursor applies to requests matching an enforcement rule. Unlike default_mode, this cannot be off.

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"
  default_mode = "min-friction"
  enforcement_rules = [{
    expression = "http.request.uri.path eq \"/login\""
    mode = "max-security"
    description = "Ease friction on the login path"
    enabled = true
  }]
}

data cloudflare_precursor

required Expand Collapse
zone_id: String

Identifier.

computed Expand Collapse
id: String

Identifier.

default_mode: String

The zone-level Precursor enforcement mode applied to requests that do not match a more specific enforcement rule.

enforcement_rules: List[Attributes]

The ordered list of enforcement rules for the zone.

expression: String

The filter expression that determines which requests the rule matches.

mode: String

The override mode Precursor applies to requests matching an enforcement rule. Unlike default_mode, this cannot be off.

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"
}