---
title: Page Shield
---

[Skip to content](#_top)

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

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Page Shield

#### Page ShieldPolicies

#### resource cloudflare\_page\_shield\_policy

##### required Expand Collapse

zone\_id: String

Identifier

[Link to this property](<#(resource)%20page_shield.policies%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20zone_id>)

action: String

The action to take if the expression matches

[Link to this property](<#(resource)%20page_shield.policies%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20action>)

description: String

A description for the policy

[Link to this property](<#(resource)%20page_shield.policies%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20description>)

enabled: Bool

Whether the policy is enabled

[Link to this property](<#(resource)%20page_shield.policies%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20enabled>)

expression: String

The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax

[Link to this property](<#(resource)%20page_shield.policies%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20expression>)

value: String

The policy which will be applied

[Link to this property](<#(resource)%20page_shield.policies%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20value>)

##### computed Expand Collapse

id: String

Identifier

[Link to this property](<#(resource)%20page_shield.policies%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20id>)

### cloudflare\_page\_shield\_policy

Terraform

HTTPTypeScriptPythonGoTerraform

```
resource "cloudflare_page_shield_policy" "example_page_shield_policy" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  action = "allow"
  description = "Checkout page CSP policy"
  enabled = true
  expression = "ends_with(http.request.uri.path, \"/checkout\")"
  value = "script-src \'none\';"
}
```

#### data cloudflare\_page\_shield\_policy

##### required Expand Collapse

policy\_id: String

Identifier

[Link to this property](<#(resource)%20page_shield.policies%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20policy_id>)

zone\_id: String

Identifier

[Link to this property](<#(resource)%20page_shield.policies%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20zone_id>)

##### computed Expand Collapse

id: String

Identifier

[Link to this property](<#(resource)%20page_shield.policies%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20id>)

action: String

The action to take if the expression matches

[Link to this property](<#(resource)%20page_shield.policies%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20action>)

description: String

A description for the policy

[Link to this property](<#(resource)%20page_shield.policies%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20description>)

enabled: Bool

Whether the policy is enabled

[Link to this property](<#(resource)%20page_shield.policies%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20enabled>)

expression: String

The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax

[Link to this property](<#(resource)%20page_shield.policies%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20expression>)

value: String

The policy which will be applied

[Link to this property](<#(resource)%20page_shield.policies%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20value>)

### cloudflare\_page\_shield\_policy

Terraform

HTTPTypeScriptPythonGoTerraform

```
data "cloudflare_page_shield_policy" "example_page_shield_policy" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  policy_id = "023e105f4ecef8ad9ca31a8372d0c353"
}
```

#### data cloudflare\_page\_shield\_policies

##### required Expand Collapse

zone\_id: String

Identifier

[Link to this property](<#(resource)%20page_shield.policies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20zone_id>)

##### optional Expand Collapse

max\_items?: Int64

Max items to fetch, default: 1000

[Link to this property](<#(resource)%20page_shield.policies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20max_items>)

##### computed Expand Collapse

<details>

<summary>

result: List\[Attributes]

The items returned by the data source

</summary>

id: String

Identifier

<a href="#(resource)%20page_shield.policies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20id">Link to this property</a>

action: String

The action to take if the expression matches

<a href="#(resource)%20page_shield.policies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20action">Link to this property</a>

description: String

A description for the policy

<a href="#(resource)%20page_shield.policies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20description">Link to this property</a>

enabled: Bool

Whether the policy is enabled

<a href="#(resource)%20page_shield.policies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20enabled">Link to this property</a>

expression: String

The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax

<a href="#(resource)%20page_shield.policies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20expression">Link to this property</a>

value: String

The policy which will be applied

<a href="#(resource)%20page_shield.policies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20value">Link to this property</a>

</details>

[Link to this property](<#(resource)%20page_shield.policies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result>)

### cloudflare\_page\_shield\_policies

Terraform

HTTPTypeScriptPythonGoTerraform

```
data "cloudflare_page_shield_policies" "example_page_shield_policies" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
}
```

#### Page ShieldConnections

#### data cloudflare\_page\_shield\_connections

##### required Expand Collapse

connection\_id: String

Identifier

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20connection_id>)

zone\_id: String

Identifier

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20zone_id>)

##### computed Expand Collapse

added\_at: Time

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20added_at>)

domain\_reported\_malicious: Bool

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20domain_reported_malicious>)

first\_page\_url: String

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20first_page_url>)

first\_seen\_at: Time

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20first_seen_at>)

host: String

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20host>)

id: String

Identifier

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20id>)

last\_seen\_at: Time

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20last_seen_at>)

url: String

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20url>)

url\_contains\_cdn\_cgi\_path: Bool

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20url_contains_cdn_cgi_path>)

url\_reported\_malicious: Bool

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20url_reported_malicious>)

malicious\_domain\_categories: List\[String]

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20malicious_domain_categories>)

malicious\_url\_categories: List\[String]

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20malicious_url_categories>)

page\_urls: List\[String]

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20page_urls>)

### cloudflare\_page\_shield\_connections

Terraform

HTTPTypeScriptPythonGoTerraform

```
data "cloudflare_page_shield_connections" "example_page_shield_connections" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  connection_id = "023e105f4ecef8ad9ca31a8372d0c353"
}
```

#### data cloudflare\_page\_shield\_connections\_list

##### required Expand Collapse

zone\_id: String

Identifier

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20zone_id>)

##### optional Expand Collapse

direction?: String

The direction used to sort returned connections.

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20direction>)

exclude\_cdn\_cgi?: Bool

When true, excludes connections seen in a `/cdn-cgi` path from the returned connections. The default value is true.

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20exclude_cdn_cgi>)

exclude\_urls?: String

Excludes connections whose URL contains one of the URL-encoded URLs separated by commas.

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20exclude_urls>)

export?: String

Export the list of connections as a file, limited to 50000 entries.

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20export>)

hosts?: String

Includes connections that match one or more URL-encoded hostnames separated by commas.

Wildcards are supported at the start and end of each hostname to support starts with, ends with and contains. If no wildcards are used, results will be filtered by exact match

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20hosts>)

order\_by?: String

The field used to sort returned connections.

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20order_by>)

page?: String

The current page number of the paginated results.

We additionally support a special value “all”. When “all” is used, the API will return all the connections with the applied filters in a single page. This feature is best-effort and it may only work for zones with a low number of connections

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20page>)

page\_url?: String

Includes connections that match one or more page URLs (separated by commas) where they were last seen

Wildcards are supported at the start and end of each page URL to support starts with, ends with and contains. If no wildcards are used, results will be filtered by exact match

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20page_url>)

per\_page?: Float64

The number of results per page.

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20per_page>)

prioritize\_malicious?: Bool

When true, malicious connections appear first in the returned connections.

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20prioritize_malicious>)

status?: String

Filters the returned connections using a comma-separated list of connection statuses. Accepted values: `active`, `infrequent`, and `inactive`. The default value is `active`.

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20status>)

urls?: String

Includes connections whose URL contain one or more URL-encoded URLs separated by commas.

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20urls>)

max\_items?: Int64

Max items to fetch, default: 1000

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20max_items>)

##### computed Expand Collapse

<details>

<summary>

result: List\[Attributes]

The items returned by the data source

</summary>

id: String

Identifier

<a href="#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20id">Link to this property</a>

added\_at: Time

<a href="#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20added_at">Link to this property</a>

first\_seen\_at: Time

<a href="#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20first_seen_at">Link to this property</a>

host: String

<a href="#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20host">Link to this property</a>

last\_seen\_at: Time

<a href="#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20last_seen_at">Link to this property</a>

url: String

<a href="#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20url">Link to this property</a>

url\_contains\_cdn\_cgi\_path: Bool

<a href="#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20url_contains_cdn_cgi_path">Link to this property</a>

domain\_reported\_malicious: Bool

<a href="#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20domain_reported_malicious">Link to this property</a>

first\_page\_url: String

<a href="#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20first_page_url">Link to this property</a>

malicious\_domain\_categories: List\[String]

<a href="#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20malicious_domain_categories">Link to this property</a>

malicious\_url\_categories: List\[String]

<a href="#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20malicious_url_categories">Link to this property</a>

page\_urls: List\[String]

<a href="#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20page_urls">Link to this property</a>

url\_reported\_malicious: Bool

<a href="#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20url_reported_malicious">Link to this property</a>

</details>

[Link to this property](<#(resource)%20page_shield.connections%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result>)

### cloudflare\_page\_shield\_connections\_list

Terraform

HTTPTypeScriptPythonGoTerraform

```
data "cloudflare_page_shield_connections_list" "example_page_shield_connections_list" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  direction = "asc"
  exclude_cdn_cgi = true
  exclude_urls = "blog.cloudflare.com,www.example"
  export = "csv"
  hosts = "blog.cloudflare.com,www.example*,*cloudflare.com"
  order_by = "first_seen_at"
  page = "2"
  page_url = "example.com/page,*/checkout,example.com/*,*checkout*"
  per_page = 100
  prioritize_malicious = true
  status = "active,inactive"
  urls = "blog.cloudflare.com,www.example"
}
```

#### Page ShieldScripts

#### data cloudflare\_page\_shield\_scripts

##### required Expand Collapse

script\_id: String

Identifier

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20script_id>)

zone\_id: String

Identifier

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20zone_id>)

##### computed Expand Collapse

added\_at: Time

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20added_at>)

cryptomining\_score: Int64

The cryptomining score of the JavaScript content.

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20cryptomining_score>)

Deprecateddataflow\_score: Int64

The dataflow score of the JavaScript content. This field has been deprecated in favour of js\_integrity\_score.

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20dataflow_score>)

domain\_reported\_malicious: Bool

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20domain_reported_malicious>)

fetched\_at: String

The timestamp of when the script was last fetched.

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20fetched_at>)

first\_page\_url: String

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20first_page_url>)

first\_seen\_at: Time

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20first_seen_at>)

hash: String

The computed hash of the analyzed script.

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20hash>)

host: String

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20host>)

id: String

Identifier

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20id>)

js\_integrity\_score: Int64

The integrity score of the JavaScript content.

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20js_integrity_score>)

last\_seen\_at: Time

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20last_seen_at>)

magecart\_score: Int64

The magecart score of the JavaScript content.

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20magecart_score>)

malware\_score: Int64

The malware score of the JavaScript content.

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20malware_score>)

Deprecatedobfuscation\_score: Int64

The obfuscation score of the JavaScript content. This field has been deprecated in favour of js\_integrity\_score.

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20obfuscation_score>)

url: String

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20url>)

url\_contains\_cdn\_cgi\_path: Bool

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20url_contains_cdn_cgi_path>)

url\_reported\_malicious: Bool

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20url_reported_malicious>)

malicious\_domain\_categories: List\[String]

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20malicious_domain_categories>)

malicious\_url\_categories: List\[String]

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20malicious_url_categories>)

page\_urls: List\[String]

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20page_urls>)

<details>

<summary>

versions: List\[Attributes]

</summary>

cryptomining\_score: Int64

The cryptomining score of the JavaScript content.

<a href="#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20versions%20%3E%20(attribute)%20cryptomining_score">Link to this property</a>

Deprecateddataflow\_score: Int64

The dataflow score of the JavaScript content. This field has been deprecated in favour of js\_integrity\_score.

<a href="#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20versions%20%3E%20(attribute)%20dataflow_score">Link to this property</a>

fetched\_at: String

The timestamp of when the script was last fetched.

<a href="#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20versions%20%3E%20(attribute)%20fetched_at">Link to this property</a>

hash: String

The computed hash of the analyzed script.

<a href="#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20versions%20%3E%20(attribute)%20hash">Link to this property</a>

js\_integrity\_score: Int64

The integrity score of the JavaScript content.

<a href="#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20versions%20%3E%20(attribute)%20js_integrity_score">Link to this property</a>

magecart\_score: Int64

The magecart score of the JavaScript content.

<a href="#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20versions%20%3E%20(attribute)%20magecart_score">Link to this property</a>

malware\_score: Int64

The malware score of the JavaScript content.

<a href="#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20versions%20%3E%20(attribute)%20malware_score">Link to this property</a>

Deprecatedobfuscation\_score: Int64

The obfuscation score of the JavaScript content. This field has been deprecated in favour of js\_integrity\_score.

<a href="#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20versions%20%3E%20(attribute)%20obfuscation_score">Link to this property</a>

</details>

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20versions>)

### cloudflare\_page\_shield\_scripts

Terraform

HTTPTypeScriptPythonGoTerraform

```
data "cloudflare_page_shield_scripts" "example_page_shield_scripts" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  script_id = "023e105f4ecef8ad9ca31a8372d0c353"
}
```

#### data cloudflare\_page\_shield\_scripts\_list

##### required Expand Collapse

zone\_id: String

Identifier

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20zone_id>)

##### optional Expand Collapse

direction?: String

The direction used to sort returned scripts.

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20direction>)

exclude\_urls?: String

Excludes scripts whose URL contains one of the URL-encoded URLs separated by commas.

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20exclude_urls>)

export?: String

Export the list of scripts as a file, limited to 50000 entries.

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20export>)

hosts?: String

Includes scripts that match one or more URL-encoded hostnames separated by commas.

Wildcards are supported at the start and end of each hostname to support starts with, ends with and contains. If no wildcards are used, results will be filtered by exact match

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20hosts>)

order\_by?: String

The field used to sort returned scripts.

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20order_by>)

page?: String

The current page number of the paginated results.

We additionally support a special value “all”. When “all” is used, the API will return all the scripts with the applied filters in a single page. This feature is best-effort and it may only work for zones with a low number of scripts

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20page>)

page\_url?: String

Includes scripts that match one or more page URLs (separated by commas) where they were last seen

Wildcards are supported at the start and end of each page URL to support starts with, ends with and contains. If no wildcards are used, results will be filtered by exact match

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20page_url>)

per\_page?: Float64

The number of results per page.

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20per_page>)

prioritize\_malicious?: Bool

When true, malicious scripts appear first in the returned scripts.

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20prioritize_malicious>)

status?: String

Filters the returned scripts using a comma-separated list of scripts statuses. Accepted values: `active`, `infrequent`, and `inactive`. The default value is `active`.

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20status>)

urls?: String

Includes scripts whose URL contain one or more URL-encoded URLs separated by commas.

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20urls>)

exclude\_cdn\_cgi?: Bool

When true, excludes scripts seen in a `/cdn-cgi` path from the returned scripts. The default value is true.

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20exclude_cdn_cgi>)

exclude\_duplicates?: Bool

When true, excludes duplicate scripts. We consider a script duplicate of another if their javascript content matches and they share the same url host and zone hostname. In such case, we return the most recent script for the URL host and zone hostname combination.

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20exclude_duplicates>)

max\_items?: Int64

Max items to fetch, default: 1000

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20max_items>)

##### computed Expand Collapse

<details>

<summary>

result: List\[Attributes]

The items returned by the data source

</summary>

id: String

Identifier

<a href="#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20id">Link to this property</a>

added\_at: Time

<a href="#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20added_at">Link to this property</a>

first\_seen\_at: Time

<a href="#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20first_seen_at">Link to this property</a>

host: String

<a href="#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20host">Link to this property</a>

last\_seen\_at: Time

<a href="#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20last_seen_at">Link to this property</a>

url: String

<a href="#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20url">Link to this property</a>

url\_contains\_cdn\_cgi\_path: Bool

<a href="#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20url_contains_cdn_cgi_path">Link to this property</a>

cryptomining\_score: Int64

The cryptomining score of the JavaScript content.

<a href="#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20cryptomining_score">Link to this property</a>

Deprecateddataflow\_score: Int64

The dataflow score of the JavaScript content. This field has been deprecated in favour of js\_integrity\_score.

<a href="#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20dataflow_score">Link to this property</a>

domain\_reported\_malicious: Bool

<a href="#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20domain_reported_malicious">Link to this property</a>

fetched\_at: String

The timestamp of when the script was last fetched.

<a href="#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20fetched_at">Link to this property</a>

first\_page\_url: String

<a href="#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20first_page_url">Link to this property</a>

hash: String

The computed hash of the analyzed script.

<a href="#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20hash">Link to this property</a>

js\_integrity\_score: Int64

The integrity score of the JavaScript content.

<a href="#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20js_integrity_score">Link to this property</a>

magecart\_score: Int64

The magecart score of the JavaScript content.

<a href="#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20magecart_score">Link to this property</a>

malicious\_domain\_categories: List\[String]

<a href="#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20malicious_domain_categories">Link to this property</a>

malicious\_url\_categories: List\[String]

<a href="#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20malicious_url_categories">Link to this property</a>

malware\_score: Int64

The malware score of the JavaScript content.

<a href="#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20malware_score">Link to this property</a>

Deprecatedobfuscation\_score: Int64

The obfuscation score of the JavaScript content. This field has been deprecated in favour of js\_integrity\_score.

<a href="#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20obfuscation_score">Link to this property</a>

page\_urls: List\[String]

<a href="#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20page_urls">Link to this property</a>

url\_reported\_malicious: Bool

<a href="#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20url_reported_malicious">Link to this property</a>

</details>

[Link to this property](<#(resource)%20page_shield.scripts%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result>)

### cloudflare\_page\_shield\_scripts\_list

Terraform

HTTPTypeScriptPythonGoTerraform

```
data "cloudflare_page_shield_scripts_list" "example_page_shield_scripts_list" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  direction = "asc"
  exclude_urls = "blog.cloudflare.com,www.example"
  export = "csv"
  hosts = "blog.cloudflare.com,www.example*,*cloudflare.com"
  order_by = "first_seen_at"
  page = "2"
  page_url = "example.com/page,*/checkout,example.com/*,*checkout*"
  per_page = 100
  prioritize_malicious = true
  status = "active,inactive"
  urls = "blog.cloudflare.com,www.example"
}
```

#### Page ShieldCookies

#### data cloudflare\_page\_shield\_cookies

##### required Expand Collapse

cookie\_id: String

Identifier

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20cookie_id>)

zone\_id: String

Identifier

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20zone_id>)

##### computed Expand Collapse

domain\_attribute: String

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20domain_attribute>)

expires\_attribute: Time

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20expires_attribute>)

first\_seen\_at: Time

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20first_seen_at>)

host: String

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20host>)

http\_only\_attribute: Bool

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20http_only_attribute>)

id: String

Identifier

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20id>)

last\_seen\_at: Time

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20last_seen_at>)

max\_age\_attribute: Int64

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20max_age_attribute>)

name: String

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20name>)

path\_attribute: String

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20path_attribute>)

same\_site\_attribute: String

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20same_site_attribute>)

secure\_attribute: Bool

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20secure_attribute>)

type: String

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20type>)

page\_urls: List\[String]

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20page_urls>)

### cloudflare\_page\_shield\_cookies

Terraform

HTTPTypeScriptPythonGoTerraform

```
data "cloudflare_page_shield_cookies" "example_page_shield_cookies" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  cookie_id = "023e105f4ecef8ad9ca31a8372d0c353"
}
```

#### data cloudflare\_page\_shield\_cookies\_list

##### required Expand Collapse

zone\_id: String

Identifier

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20zone_id>)

##### optional Expand Collapse

direction?: String

The direction used to sort returned cookies.’

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20direction>)

domain?: String

Filters the returned cookies that match the specified domain attribute

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20domain>)

export?: String

Export the list of cookies as a file, limited to 50000 entries.

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20export>)

hosts?: String

Includes cookies that match one or more URL-encoded hostnames separated by commas.

Wildcards are supported at the start and end of each hostname to support starts with, ends with and contains. If no wildcards are used, results will be filtered by exact match

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20hosts>)

http\_only?: Bool

Filters the returned cookies that are set with HttpOnly

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20http_only>)

name?: String

Filters the returned cookies that match the specified name. Wildcards are supported at the start and end to support starts with, ends with and contains. e.g. session\*

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20name>)

order\_by?: String

The field used to sort returned cookies.

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20order_by>)

page?: String

The current page number of the paginated results.

We additionally support a special value “all”. When “all” is used, the API will return all the cookies with the applied filters in a single page. This feature is best-effort and it may only work for zones with a low number of cookies

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20page>)

page\_url?: String

Includes connections that match one or more page URLs (separated by commas) where they were last seen

Wildcards are supported at the start and end of each page URL to support starts with, ends with and contains. If no wildcards are used, results will be filtered by exact match

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20page_url>)

path?: String

Filters the returned cookies that match the specified path attribute

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20path>)

per\_page?: Float64

The number of results per page.

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20per_page>)

same\_site?: String

Filters the returned cookies that match the specified same\_site attribute

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20same_site>)

secure?: Bool

Filters the returned cookies that are set with Secure

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20secure>)

type?: String

Filters the returned cookies that match the specified type attribute

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20type>)

max\_items?: Int64

Max items to fetch, default: 1000

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20max_items>)

##### computed Expand Collapse

<details>

<summary>

result: List\[Attributes]

The items returned by the data source

</summary>

id: String

Identifier

<a href="#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20id">Link to this property</a>

first\_seen\_at: Time

<a href="#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20first_seen_at">Link to this property</a>

host: String

<a href="#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20host">Link to this property</a>

last\_seen\_at: Time

<a href="#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20last_seen_at">Link to this property</a>

name: String

<a href="#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20name">Link to this property</a>

type: String

<a href="#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20type">Link to this property</a>

domain\_attribute: String

<a href="#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20domain_attribute">Link to this property</a>

expires\_attribute: Time

<a href="#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20expires_attribute">Link to this property</a>

http\_only\_attribute: Bool

<a href="#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20http_only_attribute">Link to this property</a>

max\_age\_attribute: Int64

<a href="#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20max_age_attribute">Link to this property</a>

page\_urls: List\[String]

<a href="#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20page_urls">Link to this property</a>

path\_attribute: String

<a href="#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20path_attribute">Link to this property</a>

same\_site\_attribute: String

<a href="#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20same_site_attribute">Link to this property</a>

secure\_attribute: Bool

<a href="#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20secure_attribute">Link to this property</a>

</details>

[Link to this property](<#(resource)%20page_shield.cookies%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result>)

### cloudflare\_page\_shield\_cookies\_list

Terraform

HTTPTypeScriptPythonGoTerraform

```
data "cloudflare_page_shield_cookies_list" "example_page_shield_cookies_list" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  direction = "asc"
  domain = "example.com"
  export = "csv"
  hosts = "blog.cloudflare.com,www.example*,*cloudflare.com"
  http_only = true
  name = "session_id"
  order_by = "first_seen_at"
  page = "2"
  page_url = "example.com/page,*/checkout,example.com/*,*checkout*"
  path = "/"
  per_page = 100
  same_site = "strict"
  secure = true
  type = "first_party"
}
```