Open
Description
This does not behave as expected because the value is the string literal"true"
, not the boolean value true
. This should be made more intuitive, or throw a warning?
data "coder_parameter" "ai" {
name = "ai"
display_name = "Use AI?"
description = "Do you want to use AI for this workspace?"
type = "bool"
form_type = "checkbox"
default = false
order = 0
}
data "coder_parameter" "ai_prompt" {
count = data.coder_parameter.ai.value == true ? 1 : 0
name = "prompt"
display_name = "Prompt"
description = ""
type = "string"
form_type = "textarea"
default = ""
styling = jsonencode({
placeholder = "hello world"
})
}