Skip to content

Latest commit

 

History

History
90 lines (62 loc) · 3.07 KB

File metadata and controls

90 lines (62 loc) · 3.07 KB
page_title configcat_setting Resource - terraform-provider-configcat
subcategory
description Creates and manages a Feature Flag or Setting. What is a Feature Flag or Setting in ConfigCat? https://configcat.com/docs/main-concepts

configcat_setting (Resource)

Creates and manages a Feature Flag or Setting. What is a Feature Flag or Setting in ConfigCat?

Example Usage

variable "config_id" {
  type = string
}

resource "configcat_setting" "my_setting" {
  config_id    = var.config_id
  key          = "isAwesomeFeatureEnabled"
  name         = "My awesome feature flag"
  hint         = "This is the hint for my awesome feature flag"
  setting_type = "boolean"
  order        = 0
}


output "setting_id" {
  value = configcat_setting.my_setting.id
}

Schema

Required

  • config_id (String) The ID of the Config.
  • key (String) The key of the Feature Flag or Setting.
  • name (String) The name of the Feature Flag or Setting.
  • order (Number) The order of the Feature Flag or Setting within a Product (zero-based). If multiple Feature Flags or Settings has the same order, they are displayed in alphabetical order.

Optional

  • hint (String) The hint of the Feature Flag or Setting.
  • is_json (Boolean) Whether this Feature Flag or Setting should validate string values as JSON values.
  • predefined_variations (Attributes List) The predefined variations of the Feature Flag or Setting. The feature is currently in closed beta state and cannot be used. (see below for nested schema)
  • setting_type (String) The type of the Feature Flag or Setting. Available values: boolean|string|int|double. Default: boolean.

Read-Only

  • id (String) The unique ID of the Feature Flag or Setting.

Nested Schema for predefined_variations

Required:

Optional:

  • hint (String) The hint of the Predefined variation.
  • name (String) The name of the Predefined variation.

Read-Only:

  • predefined_variation_id (String) The unique ID of the Predefined variation.

Nested Schema for predefined_variations.value

Optional:

  • bool_value (Boolean) The boolean representation of the value.
  • double_value (Number) The decimal number representation of the value.
  • int_value (Number) The whole number representation of the value.
  • string_value (String) The string representation of the value.

Import

Import is supported using the following syntax:

# Feature Flags/Settings can be imported using the SettingId. Get the SettingId using e.g. the [List Flags API](https://api.configcat.com/docs/#tag/Feature-Flags-and-Settings/operation/get-settings).

terraform import configcat_setting.example 1234