- Notifications
You must be signed in to change notification settings - Fork1.1k
Description
Description
Dynamic options fail to interpolate values of options when dynamic parameters are enabled. We try to repeat ourselves as little as possible. We reuse lists and maps of locals to dynamically populate parameters usingdynamic "option". When enabling dynamic parameters for a better user interface (dropdown) the UI fails to parse properly.
This currently functions without issue on the non-dynamic parameters UI. I would consider this behavior a regression in functionality.
Playground link to replicate issue
Expected Behavior
The dynamic option values are parsed properly when using interpolation.
Actual Behavior
The dynamic option does not interpolate the values properly causing each of the values to be "??". This , in turn, creates an error on the form stating the options must have unique values.

Code to replicate the issue
terraform {required_providers {coder={ source="coder/coder" version="2.5.3" } }}locals {option_partial="option"options=[ { name="option 1", value="${local.option_partial}-1", }, { name="option 2", value="${local.option_partial}-2", }, { name="option 3", value="${local.option_partial} 3", }, ]}data"coder_parameter""option_picker" {name="ide_picker"display_name="Pick your Option"type="string"form_type="dropdown"mutable=truedefault="static-${local.option_partial}"option {name="static${local.option_partial}"value="static-${local.option_partial}" }dynamic"option" {for_each=local.optionscontent {name=option.value.namevalue=option.value.valuedescription=option.value.description } }}