---
title: Precursor
---

[Skip to content](#%5Ftop) 

[API Reference](https://developers.cloudflare.com/api/terraform)

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# Precursor

#### resource cloudflare\_precursor

##### required Expand Collapse 

zone\_id: String

Identifier.

##### optional Expand Collapse 

Deprecateddefault\_mode?: String

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

Deprecatedenforcement\_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

Terraform

HTTPHTTP

TypeScriptTypeScript

PythonPython

GoGo

TerraformTerraform

```
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.

Deprecateddefault\_mode: String

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

Deprecatedenforcement\_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

Terraform

HTTPHTTP

TypeScriptTypeScript

PythonPython

GoGo

TerraformTerraform

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

```