| page_title | launchdarkly_ai_config_variation Resource - launchdarkly |
|---|---|
| subcategory | |
| description | Provides a LaunchDarkly AI config variation resource. This resource allows you to create and manage AI config variations within your LaunchDarkly project. |
Provides a LaunchDarkly AI config variation resource.
This resource allows you to create and manage AI config variations within your LaunchDarkly project.
resource "launchdarkly_ai_config_variation" "example" {
project_key = launchdarkly_project.example.key
config_key = launchdarkly_ai_config.example.key
key = "helpful-v1"
name = "Helpful V1"
model_config_key = launchdarkly_model_config.example.key
messages {
role = "system"
content = "You are a helpful customer support assistant."
}
messages {
role = "user"
content = "{{ ldctx.query }}"
}
}config_key(String) The AI config key that this variation belongs to. A change in this field will force the destruction of the existing resource and the creation of a new one.key(String) The variation's unique key. A change in this field will force the destruction of the existing resource and the creation of a new one.name(String) The variation's human-readable name.project_key(String) The project key. A change in this field will force the destruction of the existing resource and the creation of a new one.
description(String) The variation's description (used in agent mode).instructions(String) The variation's instructions (used in agent mode).messages(Block List) A list of messages for completion mode. Each message has aroleandcontent. (see below for nested schema)model(String) A JSON string representing the inline model configuration for the variation.model_config_key(String) The key of a model config resource to use for this variation.state(String) The state of the variation. Must bearchivedorpublished.tool_keys(Set of String) A set of AI tool keys to associate with this variation.
creation_date(Number) The creation timestamp of the variation.id(String) The ID of this resource.variation_id(String) The internal ID of the variation.version(Number) The version number of the variation.
Required:
content(String) The content of the message.role(String) The role of the message. Must be one ofsystem,user,assistant, ordeveloper.
Import is supported using the following syntax:
# LaunchDarkly AI config variations can be imported using the format `project_key/config_key/variation_key`
terraform import launchdarkly_ai_config_variation.example example-project/customer-assistant/helpful-v1