---
title: Flagship
---

[Skip to content](#%5Ftop) 

[API Reference](https://developers.cloudflare.com/api/terraform)

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# Flagship

#### FlagshipApps

#### resource cloudflare\_flagship\_app

##### required Expand Collapse 

account\_id: String

Cloudflare account ID.

name: String

##### computed Expand Collapse 

id: String

created\_at: String

updated\_at: String

updated\_by: String

Email of the actor who last modified the app, or `unknown` when unavailable.

### cloudflare\_flagship\_app

Terraform

HTTPHTTP

TypeScriptTypeScript

PythonPython

GoGo

TerraformTerraform

```
resource "cloudflare_flagship_app" "example_flagship_app" {
  account_id = "account_id"
  name = "x"
}

```

#### data cloudflare\_flagship\_app

##### required Expand Collapse 

app\_id: String

App identifier.

account\_id: String

Cloudflare account ID.

##### computed Expand Collapse 

id: String

App identifier.

created\_at: String

name: String

updated\_at: String

updated\_by: String

Email of the actor who last modified the app, or `unknown` when unavailable.

### cloudflare\_flagship\_app

Terraform

HTTPHTTP

TypeScriptTypeScript

PythonPython

GoGo

TerraformTerraform

```
data "cloudflare_flagship_app" "example_flagship_app" {
  account_id = "account_id"
  app_id = "app_id"
}

```

#### data cloudflare\_flagship\_apps

##### required Expand Collapse 

account\_id: String

Cloudflare account ID.

##### 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

created\_at: String

name: String

updated\_at: String

updated\_by: String

Email of the actor who last modified the app, or `unknown` when unavailable.

### cloudflare\_flagship\_apps

Terraform

HTTPHTTP

TypeScriptTypeScript

PythonPython

GoGo

TerraformTerraform

```
data "cloudflare_flagship_apps" "example_flagship_apps" {
  account_id = "account_id"
}

```

#### FlagshipAppsFlags

#### resource cloudflare\_flagship\_flag

##### required Expand Collapse 

account\_id: String

Cloudflare account ID.

app\_id: String

App identifier.

default\_variation: String

Variation the API serves when the flag is off, or when it’s on but no rule matches the context. Must be a key in `variations`.

enabled: Bool

When false, the flag bypasses all rules and always serves `default_variation`.

key: String

Unique identifier for the flag within an app. Used in all evaluation and SDK calls.

variations: Map\[String\]

Map of variation name to value. All values share the same type (boolean, string, number, or JSON object/array), and each serialized value stays within 10KB.

rules: List\[Attributes\]

Targeting rules evaluated in ascending `priority`; the first matching rule wins. An empty array means the flag always serves `default_variation`.

conditions: List\[Attributes\]

Conditions the context must satisfy for this rule to match. An empty array matches all contexts.

attribute?: String

operator?: String

value?: String

clauses?: List\[Attributes\]

attribute?: String

operator?: String

value?: String

clauses?: List\[Attributes\]

attribute?: String

operator?: String

value?: String

clauses?: List\[Attributes\]

attribute?: String

operator?: String

value?: String

clauses?: List\[Attributes\]

attribute?: String

operator?: String

value?: String

clauses?: List\[Attributes\]

attribute?: String

operator?: String

value?: String

clauses?: List\[String\]

logical\_operator?: String

logical\_operator?: String

logical\_operator?: String

logical\_operator?: String

logical\_operator?: String

logical\_operator?: String

priority: Int64

Evaluation order: the API evaluates rules with lower numbers first. Must be unique across the flag’s rules.

serve\_variation: String

Variation the API serves when this rule matches. Must be a key in `variations`.

rollout?: Attributes

percentage: Float64

Percentage of matching traffic (0–100) served this variation. For multi-way splits, use cumulative upper bounds across rules (e.g. 30, 70, 100).

attribute?: String

Context attribute used for sticky bucketing. Defaults to `targetingKey`. If absent at evaluation time, bucketing is random per request.

##### optional Expand Collapse 

flag\_key?: String

Flag key (slug).

description?: String

Deprecatedtype?: String

Deprecated compatibility field. Omit it; the API ignores this value and infers the type from the flag’s variations.

##### computed Expand Collapse 

updated\_at: String

updated\_by: String

### cloudflare\_flagship\_flag

Terraform

HTTPHTTP

TypeScriptTypeScript

PythonPython

GoGo

TerraformTerraform

```
resource "cloudflare_flagship_flag" "example_flagship_flag" {
  account_id = "account_id"
  app_id = "app_id"
  default_variation = "x"
  enabled = true
  key = "x"
  rules = [{
    conditions = [{
      attribute = "x"
      operator = "equals"
      value = "string"
    }]
    priority = 1
    serve_variation = "x"
    rollout = {
      percentage = 0
      attribute = "x"
    }
  }]
  variations = {
    foo = "string"
  }
  description = "description"
  type = "boolean"
}

```

#### data cloudflare\_flagship\_flag

##### required Expand Collapse 

account\_id: String

Cloudflare account ID.

app\_id: String

App identifier.

flag\_key: String

Flag key (slug).

##### computed Expand Collapse 

default\_variation: String

Variation the API serves when the flag is off, or when it’s on but no rule matches the context. Must be a key in `variations`.

description: String

enabled: Bool

When false, the flag bypasses all rules and always serves `default_variation`.

key: String

Unique identifier for the flag within an app. Used in all evaluation and SDK calls.

type: String

Server-inferred value type shared by all of the flag’s variations.

updated\_at: String

updated\_by: String

variations: Map\[String\]

Map of variation name to value. All values share the same type (boolean, string, number, or JSON object/array), and each serialized value stays within 10KB.

rules: List\[Attributes\]

Targeting rules evaluated in ascending `priority`; the first matching rule wins. An empty array means the flag always serves `default_variation`.

conditions: List\[Attributes\]

Conditions the context must satisfy for this rule to match. An empty array matches all contexts.

attribute: String

operator: String

value: String

clauses: List\[Attributes\]

attribute: String

operator: String

value: String

clauses: List\[Attributes\]

attribute: String

operator: String

value: String

clauses: List\[Attributes\]

attribute: String

operator: String

value: String

clauses: List\[Attributes\]

attribute: String

operator: String

value: String

clauses: List\[Attributes\]

attribute: String

operator: String

value: String

clauses: List\[String\]

logical\_operator: String

logical\_operator: String

logical\_operator: String

logical\_operator: String

logical\_operator: String

logical\_operator: String

priority: Int64

Evaluation order: the API evaluates rules with lower numbers first. Must be unique across the flag’s rules.

serve\_variation: String

Variation the API serves when this rule matches. Must be a key in `variations`.

rollout: Attributes

percentage: Float64

Percentage of matching traffic (0–100) served this variation. For multi-way splits, use cumulative upper bounds across rules (e.g. 30, 70, 100).

attribute: String

Context attribute used for sticky bucketing. Defaults to `targetingKey`. If absent at evaluation time, bucketing is random per request.

### cloudflare\_flagship\_flag

Terraform

HTTPHTTP

TypeScriptTypeScript

PythonPython

GoGo

TerraformTerraform

```
data "cloudflare_flagship_flag" "example_flagship_flag" {
  account_id = "account_id"
  app_id = "app_id"
  flag_key = "flag_key"
}

```

#### data cloudflare\_flagship\_flags

##### required Expand Collapse 

account\_id: String

Cloudflare account ID.

app\_id: String

App identifier.

##### optional Expand Collapse 

limit?: String

Max items to return (1–200).

max\_items?: Int64

Max items to fetch, default: 1000

##### computed Expand Collapse 

result: List\[Attributes\]

The items returned by the data source

default\_variation: String

Variation the API serves when the flag is off, or when it’s on but no rule matches the context. Must be a key in `variations`.

enabled: Bool

When false, the flag bypasses all rules and always serves `default_variation`.

key: String

Unique identifier for the flag within an app. Used in all evaluation and SDK calls.

rules: List\[Attributes\]

Targeting rules evaluated in ascending `priority`; the first matching rule wins. An empty array means the flag always serves `default_variation`.

conditions: List\[Attributes\]

Conditions the context must satisfy for this rule to match. An empty array matches all contexts.

attribute: String

operator: String

value: String

clauses: List\[Attributes\]

attribute: String

operator: String

value: String

clauses: List\[Attributes\]

attribute: String

operator: String

value: String

clauses: List\[Attributes\]

attribute: String

operator: String

value: String

clauses: List\[Attributes\]

attribute: String

operator: String

value: String

clauses: List\[Attributes\]

attribute: String

operator: String

value: String

clauses: List\[String\]

logical\_operator: String

logical\_operator: String

logical\_operator: String

logical\_operator: String

logical\_operator: String

logical\_operator: String

priority: Int64

Evaluation order: the API evaluates rules with lower numbers first. Must be unique across the flag’s rules.

serve\_variation: String

Variation the API serves when this rule matches. Must be a key in `variations`.

rollout: Attributes

percentage: Float64

Percentage of matching traffic (0–100) served this variation. For multi-way splits, use cumulative upper bounds across rules (e.g. 30, 70, 100).

attribute: String

Context attribute used for sticky bucketing. Defaults to `targetingKey`. If absent at evaluation time, bucketing is random per request.

type: String

Server-inferred value type shared by all of the flag’s variations.

variations: Map\[String\]

Map of variation name to value. All values share the same type (boolean, string, number, or JSON object/array), and each serialized value stays within 10KB.

description: String

updated\_at: String

updated\_by: String

### cloudflare\_flagship\_flags

Terraform

HTTPHTTP

TypeScriptTypeScript

PythonPython

GoGo

TerraformTerraform

```
data "cloudflare_flagship_flags" "example_flagship_flags" {
  account_id = "account_id"
  app_id = "app_id"
  limit = "limit"
}

```