Skip to content

rich parameters: import values from legacy parameters  #6368

Closed

Description

@mtojek

The idea here is to import values from legacy parameters to make the migration smoother. coder_parameters should use the matching value of a legacy parameter before switching to default.

@kylecarbs has an idea to introduce legacy_variable_name or legacy_name to mark the legacy name.

Activity

  1. added
    parametersbugs & feature requests related to Dynamic Parameters
    on Feb 28, 2023
  2. added this to the Rich Parameters GA milestone on Feb 28, 2023
  3. self-assigned this
    on Mar 7, 2023
  4. mtojek commented on Mar 7, 2023

    @mtojek
    MemberAuthor

    Hey @bpmct! The legacy_variable should be present in the v0.6.16 release of terraform-provider-coder (baking now). I think that you can try to migrate some old template (if you have a candidate) 👍

  5. mtojek commented on Mar 9, 2023

    @mtojek
    MemberAuthor

    Reopening as I found this buggy, need more time to spend on this

  6. reopened this on Mar 9, 2023
  7. mtojek commented on Mar 9, 2023

    @mtojek
    MemberAuthor

    Related: coder/terraform-provider-coder#109 (review)

    Ok, I've done more research. Unfortunately, this PR is insufficient, and we also need to sneak the legacy_parameter_name property for migration purposes.

    The legacy_variable property works well with targetting the default value, but if only we need to switch from the old parameter to coder_parameter (strip reference to a legacy variable), the coder_parameter loses context, and takes the default. This is due to the fact that we pass all build parameter values externally, and there is no mechanism/logic to pull the legacy variable value.

  8. mtojek commented on Mar 9, 2023

    @mtojek
    MemberAuthor

    cc @kylecarbs if you have any alternative idea how to approach this problem ^

  9. kylecarbs commented on Mar 9, 2023

    @kylecarbs
    Member

    No additional thoughts, the above makes sense. I think it's fine to have the legacy_parameter_name property in for now, it makes a lot of sense for users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

parametersbugs & feature requests related to Dynamic Parameters

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions