Skip to content
Start here

Turnstile

TurnstileWidgets

resource cloudflare_turnstile_widget

required Expand Collapse
account_id: String

Identifier

mode: String

Widget Mode

name: String

Human readable widget name. Not unique. Cloudflare suggests that you set this to a meaningful string to make it easier to identify your widget, and where it is used.

domains: List[String]
optional Expand Collapse
bot_fight_mode?: Bool

If bot_fight_mode is set to true, Cloudflare issues computationally expensive challenges in response to malicious bots (ENT only).

clearance_level?: String

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

ephemeral_id?: Bool

Return the Ephemeral ID in /siteverify (ENT only).

offlabel?: Bool

Do not show any Cloudflare branding on the widget (ENT only).

region?: String

Region where this widget can be used. This cannot be changed after creation.

computed Expand Collapse
id: String

Widget item identifier tag.

sitekey: String

Widget item identifier tag.

created_on: Time

When the widget was created.

deployed_via: String

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.

last_modified_via: String

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.

modified_on: Time

When the widget was modified.

secret: String

Secret key for this widget.

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

required Expand Collapse
account_id: String

Identifier

optional Expand Collapse
sitekey?: String

Widget item identifier tag.

filter?: Attributes
direction?: String

Direction to order widgets.

filter?: