Skip to content

Rich parameters #5574

Closed
Closed

Description

@bpmct

This is a continuation of #3906. Rich parameters will make the following possible:

  • Users can edit parameters on existing workspaces
  • Users are prompted when they update their template and new parameters are added
  • Template authors can mark some parameters as immutable, meaning they cannot be changed after initially set. For example: changing the region of a workspace may destroy the volume!
  • Icons, friendly names, and descriptions for parameters
  • Pre-plan validation on parameters (e.g. validation errors on the input)

193463761-102541de-05b5-4704-a751-e9b4654e3b30

Eventually, rich parameters may allow us to add:

  • Special validation/data sources (e.g. "all AWS regions," "all images in registry.mycompany.com")

Call notes:

  • First, we'll introduce the new parameter data source
  • Extend CLI to also use rich parameters
  • Convert examples to the new format

Next:

  • Add migration docs for migrating from variables
  • Consider deprecating parameters

Vision:

  • Terraform variables are template-wide only. In the "template settings" UI, you can edit "variables"

Activity

  1. mtojek commented on Jan 13, 2023

    @mtojek
    Member

    I'm going with this issue. First: we'll introduce the new parameter data source

  2. ammario commented on Jan 19, 2023

    @ammario
    Member

    We could warn users in the dashboard and CLI when they interact with a workspace or template configured with the old parameters.

  3. mtojek commented on Jan 20, 2023

    @mtojek
    Member

    We could warn users in the dashboard and CLI when they interact with a workspace or template configured with the old parameters.

    Good call, might be worth discussing.

    Currently, the idea is to pull parameters from the previous workspace build, unless the user provided new parameter values via CLI/site. Parameters can also have the default_value property, so altogether we should achieve a really smooth experience - if everything matches, don't need to notify or warn the user. Added template parameters should be resolved to their defaults.

    If we need transparency, I can park this for development.

  4. mtojek commented on Jan 20, 2023

    @mtojek
    Member

    Zoom message from Ammar to address later:

    How hard would it be to embed a tool in the coder CLI to rewrite templates for the new parameters?

  5. ammario commented on Jan 20, 2023

    @ammario
    Member

    Okay. That makes a lot of sense. So we can force that users use the new parameters in order to update their workspace configuration.

  6. mtojek commented on Jan 27, 2023

    @mtojek
    Member

    From Ammar on zoom:

    Would be cool if we could show immutable parameters as a section and then mutable as the second section. It creates a clear line for “think hard about these parameters”. It will also lead to more consistency between the edit and create forms.

  7. ammario commented on Feb 3, 2023

    @ammario
    Member

    From Zoom today:

    @deansheather:

    can we make the edit workspace form look the same as the create workspace form?
    like in v1
    and just disable the fields that can't change
    also the mutable/immutable headers seem odd to me, it'd be nice if users could define their own sections and we just relied on the yellow text that says it can't be changed instead

    @ammario

    What’s friendlier language we can use instead of “mutable” and “immutable” in the form? I also second Dean’s point. It would be cool if we could reuse the form and show the immutable params as disabled forms so the user is still aware of them. I also think it would be nice if we had a box around the immutable parameters like: https://i.imgur.com/tQ0TOhf.png.

    @kylecarbs

    i feel like immutable is pretty friendly as code

    @ammario

    As a section title it’s probably fine since it maps to configuration. We should at least explain what it means in a description / subtitle in the form.

  8. mtojek commented on Feb 6, 2023

    @mtojek
    Member

    @bpmct Do you think that we can convert the ideas above and these leftovers into smaller issues in favor of this meta-issue?

  9. mtojek commented on Feb 7, 2023

    @mtojek
    Member

    As agreed during the Weekly call, I converted this issue into smaller action items, hence closing this one.

  10. added this to the Rich Parameters GA milestone on Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions