Skip to content
Start here

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 edge-gateway for gateway-authenticated changes.

cloudflare_flagship_app

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 edge-gateway for gateway-authenticated changes.

cloudflare_flagship_app

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 edge-gateway for gateway-authenticated changes.

cloudflare_flagship_apps

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 served when no rule matches or the flag is disabled. 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 must be the same type (boolean, string, number, or JSON object/array). Each serialized value must be 10KB or smaller.

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?: JSON

Value to compare against the context attribute. Must be an array for in and not_in; numeric and ISO-8601 datetime strings are accepted by the ordering operators.

clauses?: List[Attributes]
attribute?: String
operator?: String
value?: JSON

Value to compare against the context attribute. Must be an array for in and not_in; numeric and ISO-8601 datetime strings are accepted by the ordering operators.

clauses?: List[Attributes]
attribute?: String
operator?: String
value?: JSON

Value to compare against the context attribute. Must be an array for in and not_in; numeric and ISO-8601 datetime strings are accepted by the ordering operators.

clauses?: List[Attributes]
attribute?: String
operator?: String
value?: JSON

Value to compare against the context attribute. Must be an array for in and not_in; numeric and ISO-8601 datetime strings are accepted by the ordering operators.

clauses?: List[Attributes]
attribute?: String
operator?: String
value?: JSON

Value to compare against the context attribute. Must be an array for in and not_in; numeric and ISO-8601 datetime strings are accepted by the ordering operators.

clauses?: List[Attributes]
attribute?: String
operator?: String
value?: JSON

Value to compare against the context attribute. Must be an array for in and not_in; numeric and ISO-8601 datetime strings are accepted by the ordering operators.

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; lower numbers are evaluated first. Must be unique across the flag’s rules.

serve_variation: String

Variation served 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
type?: String

Value type of the flag’s variations. Inferred from the variation values on write, so it may be omitted in requests.

computed Expand Collapse
updated_at: String
updated_by: String

cloudflare_flagship_flag

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 = {

      }
    }]
    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 served when no rule matches or the flag is disabled. 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

Value type of the flag’s variations. Inferred from the variation values on write, so it may be omitted in requests.

updated_at: String
updated_by: String
variations: Map[String]

Map of variation name to value. All values must be the same type (boolean, string, number, or JSON object/array). Each serialized value must be 10KB or smaller.

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: JSON

Value to compare against the context attribute. Must be an array for in and not_in; numeric and ISO-8601 datetime strings are accepted by the ordering operators.

clauses: List[Attributes]
attribute: String
operator: String
value: JSON

Value to compare against the context attribute. Must be an array for in and not_in; numeric and ISO-8601 datetime strings are accepted by the ordering operators.

clauses: List[Attributes]
attribute: String
operator: String
value: JSON

Value to compare against the context attribute. Must be an array for in and not_in; numeric and ISO-8601 datetime strings are accepted by the ordering operators.

clauses: List[Attributes]
attribute: String
operator: String
value: JSON

Value to compare against the context attribute. Must be an array for in and not_in; numeric and ISO-8601 datetime strings are accepted by the ordering operators.

clauses: List[Attributes]
attribute: String
operator: String
value: JSON

Value to compare against the context attribute. Must be an array for in and not_in; numeric and ISO-8601 datetime strings are accepted by the ordering operators.

clauses: List[Attributes]
attribute: String
operator: String
value: JSON

Value to compare against the context attribute. Must be an array for in and not_in; numeric and ISO-8601 datetime strings are accepted by the ordering operators.

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; lower numbers are evaluated first. Must be unique across the flag’s rules.

serve_variation: String

Variation served 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

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 served when no rule matches or the flag is disabled. 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: JSON

Value to compare against the context attribute. Must be an array for in and not_in; numeric and ISO-8601 datetime strings are accepted by the ordering operators.

clauses: List[Attributes]
attribute: String
operator: String
value: JSON

Value to compare against the context attribute. Must be an array for in and not_in; numeric and ISO-8601 datetime strings are accepted by the ordering operators.

clauses: List[Attributes]
attribute: String
operator: String
value: JSON

Value to compare against the context attribute. Must be an array for in and not_in; numeric and ISO-8601 datetime strings are accepted by the ordering operators.

clauses: List[Attributes]
attribute: String
operator: String
value: JSON

Value to compare against the context attribute. Must be an array for in and not_in; numeric and ISO-8601 datetime strings are accepted by the ordering operators.

clauses: List[Attributes]
attribute: String
operator: String
value: JSON

Value to compare against the context attribute. Must be an array for in and not_in; numeric and ISO-8601 datetime strings are accepted by the ordering operators.

clauses: List[Attributes]
attribute: String
operator: String
value: JSON

Value to compare against the context attribute. Must be an array for in and not_in; numeric and ISO-8601 datetime strings are accepted by the ordering operators.

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; lower numbers are evaluated first. Must be unique across the flag’s rules.

serve_variation: String

Variation served 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.

variations: Map[String]

Map of variation name to value. All values must be the same type (boolean, string, number, or JSON object/array). Each serialized value must be 10KB or smaller.

description: String
type: String

Value type of the flag’s variations. Inferred from the variation values on write, so it may be omitted in requests.

updated_at: String
updated_by: String

cloudflare_flagship_flags

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