Skip to content
Start here

Bot Management

resource cloudflare_bot_management

required Expand Collapse
zone_id: String

Identifier.

optional Expand Collapse
ai_bots_protection?: String

Enable rule to block AI Scrapers and Crawlers. Please note the value only_on_ad_pages is currently not available for Enterprise customers.

auto_update_model?: Bool

Automatically update to the newest bot detection models created by Cloudflare as they are released. Learn more.

cf_robots_variant?: String

Specifies the Robots Access Control License variant to use.

crawler_protection?: String

Enable rule to punish AI Scrapers and Crawlers via a link maze.

enable_js?: Bool

Use lightweight, invisible JavaScript detections to improve Bot Management. Learn more about JavaScript Detections.

fight_mode?: Bool

Whether to enable Bot Fight Mode.

is_robots_txt_managed?: Bool

Enable cloudflare managed robots.txt. If an existing robots.txt is detected, then managed robots.txt will be prepended to the existing robots.txt.

optimize_wordpress?: Bool

Whether to optimize Super Bot Fight Mode protections for Wordpress.

sbfm_definitely_automated?: String

Super Bot Fight Mode (SBFM) action to take on definitely automated requests.

sbfm_likely_automated?: String

Super Bot Fight Mode (SBFM) action to take on likely automated requests.

sbfm_static_resource_protection?: Bool

Super Bot Fight Mode (SBFM) to enable static resource protection. Enable if static resources on your application need bot protection. Note: Static resource protection can also result in legitimate traffic being blocked.

sbfm_verified_bots?: String

Super Bot Fight Mode (SBFM) action to take on verified bots requests.

suppress_session_score?: Bool

Whether to disable tracking the highest bot score for a session in the Bot Management cookie.

computed Expand Collapse
id: String

Identifier.

using_latest_model: Bool

A read-only field that indicates whether the zone currently is running the latest ML model.

stale_zone_configuration: Attributes

A read-only field that shows which unauthorized settings are currently active on the zone. These settings typically result from upgrades or downgrades.

optimize_wordpress: Bool

Indicates that the zone's wordpress optimization for SBFM is turned on.

sbfm_definitely_automated: String

Indicates that the zone's definitely automated requests are being blocked or challenged.

sbfm_likely_automated: String

Indicates that the zone's likely automated requests are being blocked or challenged.

sbfm_static_resource_protection: String

Indicates that the zone's static resource protection is turned on.

sbfm_verified_bots: String

Indicates that the zone's verified bot requests are being blocked.

suppress_session_score: Bool

Indicates that the zone's session score tracking is disabled.

fight_mode: Bool

Indicates that the zone's Bot Fight Mode is turned on.

cloudflare_bot_management

resource "cloudflare_bot_management" "example_bot_management" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  ai_bots_protection = "block"
  cf_robots_variant = "policy_only"
  crawler_protection = "enabled"
  enable_js = true
  fight_mode = true
  is_robots_txt_managed = false
}

data cloudflare_bot_management

required Expand Collapse
zone_id: String

Identifier.

computed Expand Collapse
id: String

Identifier.

ai_bots_protection: String

Enable rule to block AI Scrapers and Crawlers. Please note the value only_on_ad_pages is currently not available for Enterprise customers.

auto_update_model: Bool

Automatically update to the newest bot detection models created by Cloudflare as they are released. Learn more.

cf_robots_variant: String

Specifies the Robots Access Control License variant to use.

crawler_protection: String

Enable rule to punish AI Scrapers and Crawlers via a link maze.

enable_js: Bool

Use lightweight, invisible JavaScript detections to improve Bot Management. Learn more about JavaScript Detections.

fight_mode: Bool

Whether to enable Bot Fight Mode.

is_robots_txt_managed: Bool

Enable cloudflare managed robots.txt. If an existing robots.txt is detected, then managed robots.txt will be prepended to the existing robots.txt.

optimize_wordpress: Bool

Whether to optimize Super Bot Fight Mode protections for Wordpress.

sbfm_definitely_automated: String

Super Bot Fight Mode (SBFM) action to take on definitely automated requests.

sbfm_likely_automated: String

Super Bot Fight Mode (SBFM) action to take on likely automated requests.

sbfm_static_resource_protection: Bool

Super Bot Fight Mode (SBFM) to enable static resource protection. Enable if static resources on your application need bot protection. Note: Static resource protection can also result in legitimate traffic being blocked.

sbfm_verified_bots: String

Super Bot Fight Mode (SBFM) action to take on verified bots requests.

suppress_session_score: Bool

Whether to disable tracking the highest bot score for a session in the Bot Management cookie.

using_latest_model: Bool

A read-only field that indicates whether the zone currently is running the latest ML model.

stale_zone_configuration: Attributes

A read-only field that shows which unauthorized settings are currently active on the zone. These settings typically result from upgrades or downgrades.

optimize_wordpress: Bool

Indicates that the zone's wordpress optimization for SBFM is turned on.

sbfm_definitely_automated: String

Indicates that the zone's definitely automated requests are being blocked or challenged.

sbfm_likely_automated: String

Indicates that the zone's likely automated requests are being blocked or challenged.

sbfm_static_resource_protection: String

Indicates that the zone's static resource protection is turned on.

sbfm_verified_bots: String

Indicates that the zone's verified bot requests are being blocked.

suppress_session_score: Bool

Indicates that the zone's session score tracking is disabled.

fight_mode: Bool

Indicates that the zone's Bot Fight Mode is turned on.

cloudflare_bot_management

data "cloudflare_bot_management" "example_bot_management" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
}