Repository navigation
feat: Update CLI to handle managed variables - #6220
Conversation
kylecarbs
left a comment
There was a problem hiding this comment.
Looks good.
I think users could confuse the help of variables-file and parameters-file, maybe that's something to look at before merge.
|
The original form:
It's hard to figure out a good description as we don't invent anything new. These are just Terraform variables. A couple of ideas:
Any preference here, @kylecarbs @bpmct? The task will be harder once we replace the Terraform with something else. |
|
I like "Specify a file path with values for Terraform-managed variables." |
There was a problem hiding this comment.
Any plans to support something like TF_VAR=, -var, or --set as well?
In a CI pipeline when a new image is pushed, how could we set that output (ami-21912383) as a variable when a Coder template update is also pushed as the next step in the pipeline? Writing to a file and then referencing is a strange workaround.
Yes, it depends. If you have multiple variables you need to reference, then a file would be more convenient. Same with sensitive values, you don't want somebody to sniff them via Anyway, I can add an extra command option ( |
Sounds fair 👍🏼 |
|
Done! |
Related: #5980
This PR extends the CLI commands
createandpushto let user pass thevariables.ymlfile with Terraform variable values.Extra changes:
/variables: redact value and default value for sensitive parameters.variable.default == nilnot justvariable.default == "".Testing:
variablesfile to pass initial values for the new template