Skip to content

building template via UI does not support setting terraform vars #7410

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ericpaulsen opened this issue May 4, 2023 · 8 comments
Closed
Assignees
Labels
site Area: frontend dashboard

Comments

@ericpaulsen
Copy link
Member

ericpaulsen commented May 4, 2023

when terraform variables are declared in a template, the CLI will prompt the user to set these vars when running coder templates create | push.

this is not the case when editing and building a template in the UI. it will error out and require setting defaults or hard-coding the variables in the code itself rather than prompt the user as done in the CLI.

Screenshot 2023-05-04 at 10 01 18 AM

related #7408

@ericpaulsen ericpaulsen added the site Area: frontend dashboard label May 4, 2023
@bpmct bpmct added the s1 Bugs that break core workflows. Only humans may set this. label May 4, 2023
@matifali matifali added the bug label May 5, 2023
@mtojek
Copy link
Member

mtojek commented May 8, 2023

@bpmct Is it a duplicate of #7153? I think that we identified it here.

@bpmct
Copy link
Member

bpmct commented May 8, 2023

#7153 is different, which aims to prevent redirection (stay in editor) after someone presses "Publish template."

The issue with this is that variables without a default say "missing parameter"

@mtojek

This comment was marked as outdated.

@bpmct
Copy link
Member

bpmct commented May 8, 2023

If a managed variable doesn't have a default, I'm pretty sure the template creation fails inside the template editor. When using the CLI, you can provide variables at "runtime". This mismatch doesn't feels right. As a user, I wish the CLI/UI would prompt me for missing variable values.

I'm also not sure how this works with rich parameters without a default, however I think this case is less important since it seems like almost all scenarios require a rich parameter has a default value.

@francisco-mata
Copy link

Maybe add a temporary variable to use when building the template (mock_value = "random"). So it will mock the a valid variable on the build. Even tho its just a workaround, it would be awesome a prompt window with the inputs to fill-out the user requested variables.

@bpmct
Copy link
Member

bpmct commented Jul 21, 2023

We should add inputs and persist the value for the session of the template editor.

@mtojek
Copy link
Member

mtojek commented Jul 31, 2023

@BrunoQuaresma as we disabled legacy parameters, and tweaked the Template Editor, would mind checking if this issue still valid?

@BrunoQuaresma BrunoQuaresma self-assigned this Jul 31, 2023
@bpmct bpmct added feature and removed s1 Bugs that break core workflows. Only humans may set this. bug labels Aug 2, 2023
@BrunoQuaresma
Copy link
Collaborator

It is already done!

Screen Shot 2023-08-09 at 09 55 17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site Area: frontend dashboard
Projects
None yet
Development

No branches or pull requests

6 participants