Skip to content
Start here

AI Search

AI SearchNamespaces

resource cloudflare_ai_search_namespace

required Expand Collapse
account_id: String
name: String
optional Expand Collapse
description?: String

Optional description for the namespace. Max 256 characters.

public_endpoint_params?: Attributes
authorized_hosts?: List[String]
chat_completions_endpoint?: Attributes
disabled?: Bool

Disable chat completions endpoint for this public endpoint

custom_domains?: List[String]

Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged).

default_domain_enabled?: Bool

When false, the instance is reachable only via a registered custom domain and the default <public_endpoint_id>.search.ai.cloudflare.com host returns 404. Requires at least one custom domain. Defaults to true. public_endpoint_params is replaced wholesale on update, so resend default_domain_enabled on every update to keep the default host off — omitting it resets to true.

enabled?: Bool
instances_allowed?: List[String]

Instance IDs exposed through the namespace public endpoint. Empty means nothing is searchable. Every ID must be an existing instance in this namespace, and the list cannot exceed the account’s multi-instance search limit.

mcp?: Attributes
description?: String
disabled?: Bool

Disable MCP endpoint for this public endpoint

rate_limit?: Attributes
period_ms?: Int64
requests?: Int64
technique?: String
search_endpoint?: Attributes
disabled?: Bool

Disable search endpoint for this public endpoint

computed Expand Collapse
created_at: Time
public_endpoint_id: String

cloudflare_ai_search_namespace

resource "cloudflare_ai_search_namespace" "example_ai_search_namespace" {
  account_id = "c3dc5f0b34a14ff8e1b3ec04895e1b22"
  name = "name"
  description = "Production environment"
  public_endpoint_params = {
    authorized_hosts = ["string"]
    chat_completions_endpoint = {
      disabled = true
    }
    custom_domains = ["search.example.com"]
    default_domain_enabled = true
    enabled = true
    instances_allowed = ["docs", "blog"]
    mcp = {
      description = "description"
      disabled = true
    }
    rate_limit = {
      period_ms = 60000
      requests = 1
      technique = "fixed"
    }
    search_endpoint = {
      disabled = true
    }
  }
}

data cloudflare_ai_search_namespace

required Expand Collapse
account_id: String
name: String
computed Expand Collapse
created_at: Time
description: String

Optional description for the namespace. Max 256 characters.

public_endpoint_id: String
public_endpoint_params: Attributes
authorized_hosts: List[String]
chat_completions_endpoint: Attributes
disabled: Bool

Disable chat completions endpoint for this public endpoint

custom_domains: List[String]

Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged).

default_domain_enabled: Bool

When false, the instance is reachable only via a registered custom domain and the default <public_endpoint_id>.search.ai.cloudflare.com host returns 404. Requires at least one custom domain. Defaults to true. public_endpoint_params is replaced wholesale on update, so resend default_domain_enabled on every update to keep the default host off — omitting it resets to true.

enabled: Bool
instances_allowed: List[String]

Instance IDs exposed through the namespace public endpoint. Empty means nothing is searchable. Every ID must be an existing instance in this namespace, and the list cannot exceed the account’s multi-instance search limit.

mcp: Attributes
description: String
disabled: Bool

Disable MCP endpoint for this public endpoint

rate_limit: Attributes
period_ms: Int64
requests: Int64
technique: String
search_endpoint: Attributes
disabled: Bool

Disable search endpoint for this public endpoint

cloudflare_ai_search_namespace

data "cloudflare_ai_search_namespace" "example_ai_search_namespace" {
  account_id = "c3dc5f0b34a14ff8e1b3ec04895e1b22"
  name = "production"
}

data cloudflare_ai_search_namespaces

required Expand Collapse
account_id: String
optional Expand Collapse
max_items?: Int64

Max items to fetch, default: 1000

computed Expand Collapse
result: List[Attributes]

The items returned by the data source

created_at: Time
name: String
description: String

Optional description for the namespace. Max 256 characters.

public_endpoint_id: String
public_endpoint_params: Attributes
authorized_hosts: List[String]
chat_completions_endpoint: Attributes
disabled: Bool

Disable chat completions endpoint for this public endpoint

custom_domains: List[String]

Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged).

default_domain_enabled: Bool

When false, the instance is reachable only via a registered custom domain and the default <public_endpoint_id>.search.ai.cloudflare.com host returns 404. Requires at least one custom domain. Defaults to true. public_endpoint_params is replaced wholesale on update, so resend default_domain_enabled on every update to keep the default host off — omitting it resets to true.

enabled: Bool
instances_allowed: List[String]

Instance IDs exposed through the namespace public endpoint. Empty means nothing is searchable. Every ID must be an existing instance in this namespace, and the list cannot exceed the account’s multi-instance search limit.

mcp: Attributes
description: String
disabled: Bool

Disable MCP endpoint for this public endpoint

rate_limit: Attributes
period_ms: Int64
requests: Int64
technique: String
search_endpoint: Attributes
disabled: Bool

Disable search endpoint for this public endpoint

cloudflare_ai_search_namespaces

data "cloudflare_ai_search_namespaces" "example_ai_search_namespaces" {
  account_id = "c3dc5f0b34a14ff8e1b3ec04895e1b22"
  search = "prod"
}

AI SearchInstances

resource cloudflare_ai_search_instance

required Expand Collapse
id: String

AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.

account_id: String
optional Expand Collapse
type?: String
Deprecatedhybrid_search_enabled?: Bool

Deprecated — use index_method instead.

ai_gateway_id?: String
aisearch_model?: String
chunk_size?: Int64
embedding_model?: String
reranking_model?: String
rewrite_model?: String
source?: String
summarization_model?: String
system_prompt_aisearch?: String
system_prompt_index_summarization?: String
system_prompt_rewrite_query?: String
token_id?: String
custom_metadata?: List[Attributes]
data_type: String
field_name: String
metadata?: Attributes
created_from_aisearch_wizard?: Bool
worker_domain?: String
retrieval_options?: Attributes
boost_by?: List[Attributes]

Metadata fields to boost search results by. Each entry specifies a metadata field and an optional direction. Direction defaults to ‘asc’ for numeric/datetime fields and ‘exists’ for text/boolean fields. Fields must match ‘timestamp’ or a defined custom_metadata field.

field: String

Metadata field name to boost by. Use ‘timestamp’ for document freshness, or any custom_metadata field. Numeric and datetime fields support all four directions (asc, desc, exists, not_exists); text/boolean fields only support exists/not_exists.

direction?: String

Boost direction. ‘desc’ = higher values rank higher (e.g. newer timestamps). ‘asc’ = lower values rank higher. ‘exists’ = boost chunks that have the field. ‘not_exists’ = boost chunks that lack the field. Optional — defaults to ‘asc’ for numeric/datetime fields, ‘exists’ for text/boolean fields.

keyword_match_mode?: String

Controls which documents are candidates for BM25 scoring. ‘and’ restricts candidates to documents containing all query terms; ‘or’ includes any document containing at least one term, ranked by BM25 relevance. When omitted on an update, the existing stored value is preserved; when never set, search falls back to ‘and’.

cache?: Bool
cache_threshold?: String
cache_ttl?: Float64

Cache entry TTL in seconds. Allowed values: 600 (10min), 1800 (30min), 3600 (1h), 7200 (2h), 21600 (6h), 43200 (12h), 86400 (24h), 172800 (48h), 259200 (72h), 518400 (6d).

chunk?: Bool
chunk_overlap?: Int64
fusion_method?: String
max_num_results?: Int64
paused?: Bool
reranking?: Bool
rewrite_query?: Bool
score_threshold?: Float64
summarization?: Bool
sync_interval?: Float64

Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h).

index_method?: Attributes

Controls which storage backends are used during indexing. Defaults to vector-only.

keyword: Bool

Enable keyword (BM25) storage backend.

vector: Bool

Enable vector (embedding) storage backend.

indexing_options?: Attributes
keyword_tokenizer?: String

Tokenizer used for keyword search indexing. porter provides word-level tokenization with Porter stemming (good for natural language queries). trigram enables character-level substring matching (good for partial matches, code, identifiers). Changing this triggers a full re-index. Defaults to porter.

public_endpoint_params?: Attributes
authorized_hosts?: List[String]
chat_completions_endpoint?: Attributes
disabled?: Bool

Disable chat completions endpoint for this public endpoint

custom_domains?: List[String]

Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged).

default_domain_enabled?: Bool

When false, the instance is reachable only via a registered custom domain and the default <public_endpoint_id>.search.ai.cloudflare.com host returns 404. Requires at least one custom domain. Defaults to true. public_endpoint_params is replaced wholesale on update, so resend default_domain_enabled on every update to keep the default host off — omitting it resets to true.

enabled?: Bool
mcp?: Attributes
description?: String
disabled?: Bool

Disable MCP endpoint for this public endpoint

rate_limit?: Attributes
period_ms?: Int64
requests?: Int64
technique?: String
search_endpoint?: Attributes
disabled?: Bool

Disable search endpoint for this public endpoint

source_params?: Attributes
exclude_items?: List[String]

List of path patterns to exclude. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /admin/** matches /admin/users and /admin/settings/advanced). Most accounts are limited to 10 rules; contact support to raise it.

include_items?: List[String]

List of path patterns to include. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /blog/** matches /blog/post and /blog/2024/post). Most accounts are limited to 10 rules; contact support to raise it.

prefix?: String
r2_jurisdiction?: String
web_crawler?: Attributes
discover_options?: Attributes

Options for parse_type ‘discover’, where Browser Run discovers URLs by link following and sitemaps. Ignored for ‘sitemap’.

depth?: Float64

Maximum link-follow depth from the seed URL.

include_subdomains?: Bool

Follow links to subdomains of the source host.

limit?: Float64

Maximum number of pages to crawl (1-100000).

max_age?: Float64

Maximum content age in seconds to accept (0–604800).

source?: String

Where the crawler looks for URLs: ‘sitemaps’ reads sitemap XML only, ‘links’ follows page links only, ‘all’ does both.

parse_options?: Attributes
content_selector?: List[Attributes]

List of path-to-selector mappings for extracting specific content from crawled pages. Each entry pairs a URL glob pattern with a CSS selector. The first matching path wins. Only the matched HTML fragment is stored and indexed. Omit the field to disable content selection — empty arrays are rejected.

path: String

Glob pattern to match against the page URL path. Uses standard glob syntax: * matches within a segment, ** crosses directories.

selector: String

CSS selector to extract content from pages matching the path pattern. Must not contain disallowed characters (;, `, $, {, }, ). Must target a single element; if multiple elements match, the selector is ignored and the full page is used.

include_headers?: Map[String]

Up to 5 custom HTTP headers sent with each crawl request. Names must be RFC-7230 token characters (no spaces, colons, or control characters); values must be HTAB + printable ASCII (no CR/LF).

include_images?: Bool
specific_sitemaps?: List[String]

List of specific sitemap URLs to use for crawling. Only valid when parse_type is ‘sitemap’.

use_browser_rendering?: Bool
parse_type?: String

How URLs are discovered. ‘sitemap’ reads XML sitemaps; ‘discover’ follows links recursively and requires the source to be a Verified zone on this account.

computed Expand Collapse
created_at: Time
created_by: String
enable: Bool
engine_version: Float64
last_activity: Time
modified_at: Time
modified_by: String
namespace: String
public_endpoint_id: String
status: String

cloudflare_ai_search_instance

resource "cloudflare_ai_search_instance" "example_ai_search_instance" {
  account_id = "c3dc5f0b34a14ff8e1b3ec04895e1b22"
  id = "my-ai-search"
  ai_gateway_id = "ai_gateway_id"
  aisearch_model = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
  cache = true
  cache_threshold = "super_strict_match"
  cache_ttl = 600
  chunk = true
  chunk_overlap = 0
  chunk_size = 64
  custom_metadata = [{
    data_type = "text"
    field_name = "x"
  }]
  embedding_model = "@cf/qwen/qwen3-embedding-0.6b"
  fusion_method = "max"
  hybrid_search_enabled = true
  index_method = {
    keyword = true
    vector = true
  }
  indexing_options = {
    keyword_tokenizer = "porter"
  }
  max_num_results = 1
  metadata = {
    created_from_aisearch_wizard = true
    worker_domain = "worker_domain"
  }
  public_endpoint_params = {
    authorized_hosts = ["string"]
    chat_completions_endpoint = {
      disabled = true
    }
    custom_domains = ["search.example.com"]
    default_domain_enabled = true
    enabled = true
    mcp = {
      description = "description"
      disabled = true
    }
    rate_limit = {
      period_ms = 60000
      requests = 1
      technique = "fixed"
    }
    search_endpoint = {
      disabled = true
    }
  }
  reranking = true
  reranking_model = "@cf/baai/bge-reranker-base"
  retrieval_options = {
    boost_by = [{
      field = "timestamp"
      direction = "desc"
    }]
    keyword_match_mode = "and"
  }
  rewrite_model = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
  rewrite_query = true
  score_threshold = 0
  source = "source"
  source_params = {
    exclude_items = ["/admin/**", "/private/**", "**\\temp\\**"]
    include_items = ["/blog/**", "/docs/**/*.html", "**\\blog\\**.html"]
    prefix = "prefix"
    r2_jurisdiction = "r2_jurisdiction"
    web_crawler = {
      discover_options = {
        depth = 5
        include_external_links = false
        include_subdomains = false
        limit = 10000
        max_age = 86400
        source = "all"
      }
      parse_options = {
        content_selector = [{
          path = "**/blog/**"
          selector = "article div.post-body"
        }, {
          path = "**/docs/**"
          selector = "main"
        }]
        include_headers = {
          cache-control = "no-cache, no-store"
        }
        include_images = true
        specific_sitemaps = ["https://example.com/sitemap.xml", "https://example.com/blog-sitemap.xml"]
        use_browser_rendering = true
      }
      parse_type = "sitemap"
    }
  }
  sync_interval = 900
  token_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
  type = "r2"
}

data cloudflare_ai_search_instance

required Expand Collapse
account_id: String
optional Expand Collapse
id?: String
filter?: Attributes
namespace?: String

Filter by namespace.

order_by?: String

Field to order results by.

order_by_direction?: String

Order direction.

computed Expand Collapse
ai_gateway_id: String
aisearch_model: String
cache: Bool
cache_threshold: String
cache_ttl: Float64

Cache entry TTL in seconds. Allowed values: 600 (10min), 1800 (30min), 3600 (1h), 7200 (2h), 21600 (6h), 43200 (12h), 86400 (24h), 172800 (48h), 259200 (72h), 518400 (6d).

chunk_overlap: Int64
chunk_size: Int64
created_at: Time
created_by: String
embedding_model: String
enable: Bool
engine_version: Float64
fusion_method: String
Deprecatedhybrid_search_enabled: Bool

Deprecated — use index_method instead.

last_activity: Time
max_num_results: Int64
modified_at: Time
modified_by: String
namespace: String
paused: Bool
public_endpoint_id: String
reranking: Bool
reranking_model: String
rewrite_model: String
rewrite_query: Bool
score_threshold: Float64
source: String
status: String
sync_interval: Float64

Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h).

token_id: String
type: String
custom_metadata: List[Attributes]
data_type: String
field_name: String
index_method: Attributes

Controls which storage backends are used during indexing. Defaults to vector-only.

keyword: Bool

Enable keyword (BM25) storage backend.

vector: Bool

Enable vector (embedding) storage backend.

indexing_options: Attributes
keyword_tokenizer: String

Tokenizer used for keyword search indexing. porter provides word-level tokenization with Porter stemming (good for natural language queries). trigram enables character-level substring matching (good for partial matches, code, identifiers). Changing this triggers a full re-index. Defaults to porter.

metadata: Attributes
created_from_aisearch_wizard: Bool
worker_domain: String
public_endpoint_params: Attributes
authorized_hosts: List[String]
chat_completions_endpoint: Attributes
disabled: Bool

Disable chat completions endpoint for this public endpoint

custom_domains: List[String]

Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged).

default_domain_enabled: Bool

When false, the instance is reachable only via a registered custom domain and the default <public_endpoint_id>.search.ai.cloudflare.com host returns 404. Requires at least one custom domain. Defaults to true. public_endpoint_params is replaced wholesale on update, so resend default_domain_enabled on every update to keep the default host off — omitting it resets to true.

enabled: Bool
mcp: Attributes
description: String
disabled: Bool

Disable MCP endpoint for this public endpoint

rate_limit: Attributes
period_ms: Int64
requests: Int64
technique: String
search_endpoint: Attributes
disabled: Bool

Disable search endpoint for this public endpoint

retrieval_options: Attributes
boost_by: List[Attributes]

Metadata fields to boost search results by. Each entry specifies a metadata field and an optional direction. Direction defaults to ‘asc’ for numeric/datetime fields and ‘exists’ for text/boolean fields. Fields must match ‘timestamp’ or a defined custom_metadata field.

field: String

Metadata field name to boost by. Use ‘timestamp’ for document freshness, or any custom_metadata field. Numeric and datetime fields support all four directions (asc, desc, exists, not_exists); text/boolean fields only support exists/not_exists.

direction: String

Boost direction. ‘desc’ = higher values rank higher (e.g. newer timestamps). ‘asc’ = lower values rank higher. ‘exists’ = boost chunks that have the field. ‘not_exists’ = boost chunks that lack the field. Optional — defaults to ‘asc’ for numeric/datetime fields, ‘exists’ for text/boolean fields.

keyword_match_mode: String

Controls which documents are candidates for BM25 scoring. ‘and’ restricts candidates to documents containing all query terms; ‘or’ includes any document containing at least one term, ranked by BM25 relevance. When omitted on an update, the existing stored value is preserved; when never set, search falls back to ‘and’.

source_params: Attributes
exclude_items: List[String]

List of path patterns to exclude. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /admin/** matches /admin/users and /admin/settings/advanced). Most accounts are limited to 10 rules; contact support to raise it.

include_items: List[String]

List of path patterns to include. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /blog/** matches /blog/post and /blog/2024/post). Most accounts are limited to 10 rules; contact support to raise it.

prefix: String
r2_jurisdiction: String
web_crawler: Attributes
discover_options: Attributes

Options for parse_type ‘discover’, where Browser Run discovers URLs by link following and sitemaps. Ignored for ‘sitemap’.

depth: Float64

Maximum link-follow depth from the seed URL.

include_subdomains: Bool

Follow links to subdomains of the source host.

limit: Float64

Maximum number of pages to crawl (1-100000).

max_age: Float64

Maximum content age in seconds to accept (0–604800).

source: String

Where the crawler looks for URLs: ‘sitemaps’ reads sitemap XML only, ‘links’ follows page links only, ‘all’ does both.

parse_options: Attributes
content_selector: List[Attributes]

List of path-to-selector mappings for extracting specific content from crawled pages. Each entry pairs a URL glob pattern with a CSS selector. The first matching path wins. Only the matched HTML fragment is stored and indexed. Omit the field to disable content selection — empty arrays are rejected.

path: String

Glob pattern to match against the page URL path. Uses standard glob syntax: * matches within a segment, ** crosses directories.

selector: String

CSS selector to extract content from pages matching the path pattern. Must not contain disallowed characters (;, `, $, {, }, ). Must target a single element; if multiple elements match, the selector is ignored and the full page is used.

include_headers: Map[String]

Up to 5 custom HTTP headers sent with each crawl request. Names must be RFC-7230 token characters (no spaces, colons, or control characters); values must be HTAB + printable ASCII (no CR/LF).

include_images: Bool
specific_sitemaps: List[String]

List of specific sitemap URLs to use for crawling. Only valid when parse_type is ‘sitemap’.

use_browser_rendering: Bool
parse_type: String

How URLs are discovered. ‘sitemap’ reads XML sitemaps; ‘discover’ follows links recursively and requires the source to be a Verified zone on this account.

cloudflare_ai_search_instance

data "cloudflare_ai_search_instance" "example_ai_search_instance" {
  account_id = "c3dc5f0b34a14ff8e1b3ec04895e1b22"
  id = "my-ai-search"
}

data cloudflare_ai_search_instances

required Expand Collapse
account_id: String
optional Expand Collapse
namespace?: String

Filter by namespace.

order_by?: String

Field to order results by.

order_by_direction?: String

Order direction.

max_items?: Int64

Max items to fetch, default: 1000

computed Expand Collapse
result: List[Attributes]

The items returned by the data source

id: String
ai_gateway_id: String
aisearch_model: String
cache: Bool
cache_threshold: String
cache_ttl: Float64
chunk: Bool
chunk_overlap: Float64
chunk_size: Float64
created_at: Time
created_by: String
custom_metadata: List[Attributes]
data_type: String
field_name: String
embedding_model: String
enable: Bool
engine_version: Float64
fusion_method: String
hybrid_search_enabled: Bool
index_method: Attributes
keyword: Bool
vector: Bool
indexing_options: Attributes
keyword_tokenizer: String
last_activity: Time
max_num_results: Float64
metadata: Attributes
created_from_aisearch_wizard: Bool
worker_domain: String
modified_at: Time
modified_by: String
namespace: String
paused: Bool
public_endpoint_id: String
public_endpoint_params: Attributes
authorized_hosts: List[String]
chat_completions_endpoint: Attributes
disabled: Bool
custom_domains: List[String]
default_domain_enabled: Bool
enabled: Bool
mcp: Attributes
description: String
disabled: Bool
rate_limit: Attributes
period_ms: Int64
requests: Int64
technique: String
search_endpoint: Attributes
disabled: Bool
reranking: Bool
reranking_model: String
retrieval_options: Attributes
boost_by: List[Attributes]
field: String
data_type: String
direction: String
keyword_match_mode: String
rewrite_model: String
rewrite_query: Bool
score_threshold: Float64
source: String
source_params: Attributes
exclude_items: List[String]
include_items: List[String]
prefix: String
r2_jurisdiction: String
web_crawler: Attributes
discover_options: Attributes
depth: Float64
include_subdomains: Bool
limit: Float64

Maximum number of pages to crawl. New values are capped at 100000; instances configured before that cap may report a higher stored value, which the crawler clamps at run time.

max_age: Float64
source: String
parse_options: Attributes
content_selector: List[Attributes]
path: String
selector: String
include_headers: Map[String]
include_images: Bool
specific_sitemaps: List[String]
use_browser_rendering: Bool
parse_type: String
status: String
summarization: Bool
summarization_model: String
sync_interval: Float64
system_prompt_aisearch: String
system_prompt_index_summarization: String
system_prompt_rewrite_query: String
token_id: String
type: String

cloudflare_ai_search_instances

data "cloudflare_ai_search_instances" "example_ai_search_instances" {
  account_id = "c3dc5f0b34a14ff8e1b3ec04895e1b22"
  namespace = "namespace"
  search = "search"
}

AI SearchTokens

resource cloudflare_ai_search_token

required Expand Collapse
account_id: String
cf_api_id: String
cf_api_key: String
name: String
optional Expand Collapse
legacy?: Bool
computed Expand Collapse
id: String
created_at: Time
created_by: String
enabled: Bool
modified_at: Time
modified_by: String

cloudflare_ai_search_token

resource "cloudflare_ai_search_token" "example_ai_search_token" {
  account_id = "c3dc5f0b34a14ff8e1b3ec04895e1b22"
  cf_api_id = "a1b2c3d4e5f6"
  cf_api_key = "abc123"
  name = "my-token"
  legacy = true
}

data cloudflare_ai_search_token

required Expand Collapse
account_id: String
optional Expand Collapse
id?: String
filter?: Attributes
computed Expand Collapse
cf_api_id: String
created_at: Time
created_by: String
enabled: Bool
legacy: Bool
modified_at: Time
modified_by: String
name: String

cloudflare_ai_search_token

data "cloudflare_ai_search_token" "example_ai_search_token" {
  account_id = "c3dc5f0b34a14ff8e1b3ec04895e1b22"
  id = "62af0db3-c410-40b2-9ee3-0e93f6dd1de0"
}

data cloudflare_ai_search_tokens

required Expand Collapse
account_id: String
optional Expand Collapse
max_items?: Int64

Max items to fetch, default: 1000

computed Expand Collapse
result: List[Attributes]

The items returned by the data source

id: String
cf_api_id: String
created_at: Time
modified_at: Time
name: String
created_by: String
enabled: Bool
legacy: Bool
modified_by: String

cloudflare_ai_search_tokens

data "cloudflare_ai_search_tokens" "example_ai_search_tokens" {
  account_id = "c3dc5f0b34a14ff8e1b3ec04895e1b22"
  search = "my-token"
}