| 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 |
Creates and manages a Feature Flag or Setting. What is a Feature Flag or Setting in ConfigCat?
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
}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.
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.
id(String) The unique ID of the Feature Flag or Setting.
Required:
value(Attributes) Represents the value of a Predefined variation. (see below for nested schema)
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.
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 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