Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bug: Template parsing error with dynamic options that have interpolated values #20930

Open
Labels
parametersbugs & feature requests related to Dynamic Parameters
@xiphoid24

Description

@xiphoid24

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.

Image

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    }  }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    parametersbugs & feature requests related to Dynamic Parameters

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp