Closed
Description
What is your suggestion?
If I create a template with var1=foo
as a sensitive (template) variable, I have no way to update the template and change the template to var1=bar
. Coder does not support reading from .tfvars
files, or TF_VAR
environment variables during coder templates create
or coder templates update
.
Related #1751, but also encompasses updating an existing variable. #1541 allows you to specify vars from a file, but does no work for updating workspaces.
Why do you want this feature?
Editing template variables is a key part of iterating on a template. To name specific workflows:
- patching/updating base container images for Docker and K8s workspaces
- rotating/updating the API key for a cloud provider
- migrating docker host for workspaces
- fixing broken templates due to invalid (or dynamic) var
Are there any workarounds to get this functionality today?
Hardcoding (and committing) secret variables and environment information.
Some type of sed
magic to inject variables into .tf
via CLI scripts. Yikes
Are you interested in submitting a PR for this?
No