You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rich parameters: import values from legacy parameters #6368
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.
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) 👍
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.
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.
Activity
mtojek commentedon Mar 7, 2023
Hey @bpmct! The
legacy_variableshould be present in thev0.6.16release of terraform-provider-coder (baking now). I think that you can try to migrate some old template (if you have a candidate) 👍mtojek commentedon Mar 9, 2023
Reopening as I found this buggy, need more time to spend on this
mtojek commentedon Mar 9, 2023
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_nameproperty for migration purposes.The
legacy_variableproperty works well with targetting the default value, but if only we need to switch from the old parameter tocoder_parameter(strip reference to a legacy variable), thecoder_parameterloses 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.mtojek commentedon Mar 9, 2023
cc @kylecarbs if you have any alternative idea how to approach this problem ^
kylecarbs commentedon Mar 9, 2023
No additional thoughts, the above makes sense. I think it's fine to have the
legacy_parameter_nameproperty in for now, it makes a lot of sense for users.