Repository navigation
feat: Read params from file for template/workspace creation - #1541
Conversation
There was a problem hiding this comment.
tfvars is the standard way to handle this with Terraform.
I'd prefer to not have our own solution, because that'd remove the ability for users to do terraform apply.
There was a problem hiding this comment.
@kylecarbs that assumes we use terraform, but our cli should be terraform agnostic right?
Also tfvars is just HCL or yaml. So we could just support multiple file types
There was a problem hiding this comment.
Developers also won't have the tf file when running coder workspace create, only the person who made the template will have the tf file.
There was a problem hiding this comment.
We can be Terraform agnostic while still consuming tfvars. Latching onto the existing Terraform ecosystem is a much better user experience than forking it with our own parameter format.
I don't believe it's necessary to have a tfvars equivalent when creating a workspace. Or at least, we haven't seen it as a problem yet.
There was a problem hiding this comment.
Issue #1377 mentions creating workspaces using parameter files, which is why I went with a non-tfvars approach. However, #1426 does talk about doing this for templates. Would you recommend solving both problems using different approaches or only work on #1426 (template creation via file) via tfvars? Let me quickly check how feasible using tfvars for template creation is.
There was a problem hiding this comment.
Is there a documented flow of how the customers would use terraform apply when setting up templates? I tried using the tfvars file as follows:
$ terraform init
$ terraform apply -var-file="<path_to_tfvars>"
...
Apply complete! Resources: 3 added, 0 changed, 0 destroyed.
It did not create a template and calling coder templates create after this still asked me for input, so I am not sure what the actual flow should be.
c7bb16f to
dc80543
Compare
|
Interestingly, the error I am encountering in the Windows tests is a known Go issue: golang/go#52986. Trying a workaround. |
|
The fix does not help. What is the precedent in these cases? Revert the |
86b1028 to
1491620
Compare
This allows users to use parameter files for variable input during template and workspace creation.
Subtasks
Fixes #1377