Turnstile
TurnstileWidgets
resource cloudflare_turnstile_widget
required
optional
If bot_fight_mode is set to true, Cloudflare issues computationally
expensive challenges in response to malicious bots (ENT only).
computed
Origin that created this widget, recorded at creation time and immutable afterward. Server-derived from the create request; not client-settable. Omitted from the response for widgets created before this field existed.
cloudflare_turnstile_widget
resource "cloudflare_turnstile_widget" "example_turnstile_widget" {
account_id = "023e105f4ecef8ad9ca31a8372d0c353"
domains = ["203.0.113.1", "cloudflare.com", "blog.example.com"]
mode = "invisible"
name = "blog.cloudflare.com login form"
bot_fight_mode = false
clearance_level = "interactive"
ephemeral_id = false
offlabel = false
region = "world"
}
data cloudflare_turnstile_widget
computed
If bot_fight_mode is set to true, Cloudflare issues computationally
expensive challenges in response to malicious bots (ENT only).
If Turnstile is embedded on a Cloudflare site and the widget should grant challenge clearance, this setting can determine the clearance level to be set
Origin that created this widget, recorded at creation time and immutable afterward. Server-derived from the create request; not client-settable. Omitted from the response for widgets created before this field existed.
Origin of the most recent mutation (create, update, delete, or secret rotation). Server-derived; not client-settable. Omitted for widgets last mutated before this field existed.
cloudflare_turnstile_widget
data "cloudflare_turnstile_widget" "example_turnstile_widget" {
account_id = "023e105f4ecef8ad9ca31a8372d0c353"
sitekey = "0x4AAF00AAAABn0R22HWm-YUc"
}
data cloudflare_turnstile_widgets
optional
Filter widgets by field using case-insensitive substring matching.
Format: field:value
Supported fields:
name- Filter by widget name (e.g.,filter=name:login-form)sitekey- Filter by sitekey (e.g.,filter=sitekey:0x4AAA)
Returns 400 Bad Request if the field is unsupported or format is invalid. An empty filter value returns all results.
cloudflare_turnstile_widgets
data "cloudflare_turnstile_widgets" "example_turnstile_widgets" {
account_id = "023e105f4ecef8ad9ca31a8372d0c353"
direction = "asc"
filter = "name:my-widget"
order = "id"
}