-
Notifications
You must be signed in to change notification settings - Fork 886
feat: Allow partially filled out parameter files #5390
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
Comments
I think this would be a great addition. I believe terraform has the same behavior, which I've found helpful in the past. |
Well, turns out its a dead simple code change to implement!
If y'all are open for a PR I can get that pushed up pretty quick (Haven't run tests yet since I built it in an incomplete dev environment but i'll update/add any necessary tests as part of the PR). |
Please do! Feel free to ping me if you'd like help with the tests as well. |
Running a lint right now and about to push up the changes I made and open a PR. I think an existing test I updated should be sufficient for the change made but will make any recommended changes in the PR if necessary! |
Summary
If using the
--parameter-file
option from the CLI, it requires that all of the templates defined variables be set otherwise it will fail with an error message stating a parameter is missing (Parameter value absent in parameter file for "<some-param>"!
). If the CLI were capable of consuming partial parameter files and then interactively prompting for the missing parameters, it would make providing parameters that are used by many/all of a users workspaces simpler thus making for a smoother UX.Example of the Current behavior
Command
Variables defined in the template
Parameter File Contents
Results
Feature Request
For many of the resources that we will be provisioning, there will be a common set of parameters being passed to coder by the user for provisioning resources1 with the remainder of parameters being used to customize the deployment (Things like image name, vm sizes etc).
If the CLI were able to load a partially filled out parameters file and then prompt the user for anything that it finds missing from that file, it would facilitate users being able to maintain parameter files with their common configuration choices to pass to the coder CLI and only require them to interactively provide the options for customizing that workspace resource.
Example mock up of what the same interaction would look like with the proposed feature
Footnotes
We heavily provision on OpenStack and use individual OpenStack Projects for resource segregation. This results in requiring our users provide the necessary application credentials for the project they are deploying to so that coder can provision the resources. ↩
The text was updated successfully, but these errors were encountered: