Page Shield
Page ShieldPolicies
resource cloudflare_page_shield_policy
cloudflare_page_shield_policy
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
cloudflare_page_shield_policy
data "cloudflare_page_shield_policy" "example_page_shield_policy" {
zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
policy_id = "023e105f4ecef8ad9ca31a8372d0c353"
}
Page ShieldConnections
data cloudflare_page_shield_connections
computed
cloudflare_page_shield_connections
data "cloudflare_page_shield_connections" "example_page_shield_connections" {
zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
connection_id = "023e105f4ecef8ad9ca31a8372d0c353"
}
data cloudflare_page_shield_connections_list
optional
When true, excludes connections seen in a /cdn-cgi path from the returned connections. The default value is true.
Excludes connections whose URL contains one of the URL-encoded URLs separated by commas.
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
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
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
When true, malicious connections appear first in the returned connections.
Filters the returned connections using a comma-separated list of connection statuses. Accepted values: active, infrequent, and inactive. The default value is active.
cloudflare_page_shield_connections_list
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
cloudflare_page_shield_scripts
data "cloudflare_page_shield_scripts" "example_page_shield_scripts" {
zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
script_id = "023e105f4ecef8ad9ca31a8372d0c353"
}
data cloudflare_page_shield_scripts_list
optional
Excludes scripts whose URL contains one of the URL-encoded URLs separated by commas.
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
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
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
Filters the returned scripts using a comma-separated list of scripts statuses. Accepted values: active, infrequent, and inactive. The default value is active.
When true, excludes scripts seen in a /cdn-cgi path from the returned scripts. The default value is true.
cloudflare_page_shield_scripts_list
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
cloudflare_page_shield_cookies_list
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"
}