---
title: Bot Management
---

[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**

# Bot Management

#### resource cloudflare\_bot\_management

##### required Expand Collapse

zone\_id: String

Identifier.

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

##### optional Expand Collapse

ai\_bots\_migration\_opt\_out?: Bool

Temporary migration flag tracking zones opted out of AI bots managed-rule updates.

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20ai_bots_migration_opt_out>)

ai\_bots\_protection?: String

Enable rule to block AI Scrapers and Crawlers.

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20ai_bots_protection>)

ai\_training?: String

Configure robots.txt policy for AI model training bots.

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20ai_training>)

ai\_user?: String

Configure robots.txt policy for AI assistant and agent bots.

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20ai_user>)

aisearch?: String

Configure robots.txt policy for AI search bots.

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20aisearch>)

auto\_update\_model?: Bool

Automatically update to the newest bot detection models created by Cloudflare as they are released. [Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes)

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20auto_update_model>)

bm\_cookie\_enabled?: Bool

Indicates that the bot management cookie can be placed on end user devices accessing the site. Defaults to true

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20bm_cookie_enabled>)

bot\_preference\_sync\_enabled?: Bool

Enable Bot Preference Sync for this zone. When enabled, Cloudflare can serve robots.txt content derived from the zone’s AI Search, AI User, and AI Training preferences.

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20bot_preference_sync_enabled>)

cf\_robots\_variant?: String

Specifies the Robots Access Control License variant to use.

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20cf_robots_variant>)

content\_bots\_protection?: String

Enable rule to block content bots. When enabled, blocks automated traffic with low bot scores, excluding safe verified bot categories. Exceptions should be managed via skip rules.

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20content_bots_protection>)

crawler\_protection?: String

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

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20crawler_protection>)

enable\_js?: Bool

Use lightweight, invisible JavaScript detections to improve Bot Management. [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20enable_js>)

fight\_mode?: Bool

Whether to enable Bot Fight Mode.

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20fight_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.

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20is_robots_txt_managed>)

jsd\_api\_results\_enabled?: Bool

Whether to use JavaScript Detection results submitted through the API for this zone.

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20jsd_api_results_enabled>)

optimize\_wordpress?: Bool

Whether to optimize Super Bot Fight Mode protections for Wordpress.

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20optimize_wordpress>)

sbfm\_definitely\_automated?: String

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

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20sbfm_definitely_automated>)

sbfm\_likely\_automated?: String

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

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20sbfm_likely_automated>)

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.

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20sbfm_static_resource_protection>)

sbfm\_verified\_bots?: String

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

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20sbfm_verified_bots>)

suppress\_session\_score?: Bool

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

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20suppress_session_score>)

##### computed Expand Collapse

id: String

Identifier.

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

using\_latest\_model: Bool

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

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20using_latest_model>)

<details>

<summary>

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.

</summary>

optimize\_wordpress: Bool

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

<a href="#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20stale_zone_configuration%20%3E%20(attribute)%20optimize_wordpress">Link to this property</a>

sbfm\_definitely\_automated: String

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

<a href="#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20stale_zone_configuration%20%3E%20(attribute)%20sbfm_definitely_automated">Link to this property</a>

sbfm\_likely\_automated: String

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

<a href="#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20stale_zone_configuration%20%3E%20(attribute)%20sbfm_likely_automated">Link to this property</a>

sbfm\_static\_resource\_protection: String

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

<a href="#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20stale_zone_configuration%20%3E%20(attribute)%20sbfm_static_resource_protection">Link to this property</a>

sbfm\_verified\_bots: String

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

<a href="#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20stale_zone_configuration%20%3E%20(attribute)%20sbfm_verified_bots">Link to this property</a>

suppress\_session\_score: Bool

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

<a href="#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20stale_zone_configuration%20%3E%20(attribute)%20suppress_session_score">Link to this property</a>

fight\_mode: Bool

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

<a href="#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20stale_zone_configuration%20%3E%20(attribute)%20fight_mode">Link to this property</a>

</details>

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20stale_zone_configuration>)

### cloudflare\_bot\_management

Terraform

HTTPTypeScriptPythonGoTerraform

```
resource "cloudflare_bot_management" "example_bot_management" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  ai_bots_migration_opt_out = false
  ai_bots_protection = "block"
  aisearch = "block"
  ai_training = "disallow"
  ai_user = "only_on_ad_pages"
  bot_preference_sync_enabled = true
  cf_robots_variant = "policy_only"
  content_bots_protection = "disabled"
  crawler_protection = "enabled"
  enable_js = true
  fight_mode = true
  is_robots_txt_managed = false
  jsd_api_results_enabled = true
}
```

#### data cloudflare\_bot\_management

##### required Expand Collapse

zone\_id: String

Identifier.

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

##### computed Expand Collapse

id: String

Identifier.

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

ai\_bots\_migration\_opt\_out: Bool

Temporary migration flag tracking zones opted out of AI bots managed-rule updates.

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20ai_bots_migration_opt_out>)

ai\_bots\_protection: String

Enable rule to block AI Scrapers and Crawlers.

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20ai_bots_protection>)

ai\_training: String

Configure robots.txt policy for AI model training bots.

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20ai_training>)

ai\_user: String

Configure robots.txt policy for AI assistant and agent bots.

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20ai_user>)

aisearch: String

Configure robots.txt policy for AI search bots.

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20aisearch>)

auto\_update\_model: Bool

Automatically update to the newest bot detection models created by Cloudflare as they are released. [Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes)

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20auto_update_model>)

bm\_cookie\_enabled: Bool

Indicates that the bot management cookie can be placed on end user devices accessing the site. Defaults to true

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20bm_cookie_enabled>)

bot\_preference\_sync\_enabled: Bool

Enable Bot Preference Sync for this zone. When enabled, Cloudflare can serve robots.txt content derived from the zone’s AI Search, AI User, and AI Training preferences.

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20bot_preference_sync_enabled>)

cf\_robots\_variant: String

Specifies the Robots Access Control License variant to use.

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20cf_robots_variant>)

content\_bots\_protection: String

Enable rule to block content bots. When enabled, blocks automated traffic with low bot scores, excluding safe verified bot categories. Exceptions should be managed via skip rules.

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20content_bots_protection>)

crawler\_protection: String

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

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20crawler_protection>)

enable\_js: Bool

Use lightweight, invisible JavaScript detections to improve Bot Management. [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20enable_js>)

fight\_mode: Bool

Whether to enable Bot Fight Mode.

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20fight_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.

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20is_robots_txt_managed>)

jsd\_api\_results\_enabled: Bool

Whether to use JavaScript Detection results submitted through the API for this zone.

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20jsd_api_results_enabled>)

optimize\_wordpress: Bool

Whether to optimize Super Bot Fight Mode protections for Wordpress.

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20optimize_wordpress>)

sbfm\_definitely\_automated: String

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

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20sbfm_definitely_automated>)

sbfm\_likely\_automated: String

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

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20sbfm_likely_automated>)

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.

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20sbfm_static_resource_protection>)

sbfm\_verified\_bots: String

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

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20sbfm_verified_bots>)

suppress\_session\_score: Bool

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

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20suppress_session_score>)

using\_latest\_model: Bool

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

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20using_latest_model>)

<details>

<summary>

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.

</summary>

optimize\_wordpress: Bool

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

<a href="#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20stale_zone_configuration%20%3E%20(attribute)%20optimize_wordpress">Link to this property</a>

sbfm\_definitely\_automated: String

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

<a href="#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20stale_zone_configuration%20%3E%20(attribute)%20sbfm_definitely_automated">Link to this property</a>

sbfm\_likely\_automated: String

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

<a href="#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20stale_zone_configuration%20%3E%20(attribute)%20sbfm_likely_automated">Link to this property</a>

sbfm\_static\_resource\_protection: String

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

<a href="#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20stale_zone_configuration%20%3E%20(attribute)%20sbfm_static_resource_protection">Link to this property</a>

sbfm\_verified\_bots: String

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

<a href="#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20stale_zone_configuration%20%3E%20(attribute)%20sbfm_verified_bots">Link to this property</a>

suppress\_session\_score: Bool

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

<a href="#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20stale_zone_configuration%20%3E%20(attribute)%20suppress_session_score">Link to this property</a>

fight\_mode: Bool

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

<a href="#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20stale_zone_configuration%20%3E%20(attribute)%20fight_mode">Link to this property</a>

</details>

[Link to this property](<#(resource)%20bot_management%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20stale_zone_configuration>)

### cloudflare\_bot\_management

Terraform

HTTPTypeScriptPythonGoTerraform

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