https://linen.dev logo
is there a chance to get rid of template
# general
m
is there a chance to get rid of template create? I mean if I push a non existing template I want it to be created on the fly. Are there any technical reasons for this or could this behaviour be changed? UseCase is for BCM we have to ensure the installation is complete from zero. So after (re)-creation of coder deployment there is the last step to deploy the template(s) from a github workflow. If one can not push the template to coder if the template does not exists this would mean one have to go to CLI and create the template or we have to create the template on each push to the workflow.
k
There's no real reason we couldn't do this I suppose. Thoughts @Ben?
Both flows are technically the exact same anyways....
j
The only thing might be permission-wise. A template-admin of a certain can push but not create
but thi does not necessary need a different endpoint
k
I hope you don't mind me asking, but when you are talking about template create, do you mean the cli command or something else?
m
yes, this would be called in GitHub Action to promote templates to coder
k
So the cli wont change at all for now?
I was so confused because I actually use the CLI to create and update my templates.
k
Ahh, good point @JanL! @KozmikNano we're discussing merging the two commands. It'd certainly still exist in the CLI!
k
Thank you. Although I would use GitHub for long-term deployments, I will definitely need the CLI to test and quickly push updates.
Also, maybe, you can merge the
create
and
init
flags. Then add a choice to use a template or use the current folder.
I don't really know what the overall goal of merging or removing them is, so I can't really share my full opinion!
a
To me this sounds a good idea.
coder templates push <template-name>
should create a new template if it doesn't exist already.
c
I'd be concerned about making a typo in my command and getting a new template instead of updating an existing one. Maybe we could take inspiration from Helm's behaviour and add a
--create
parameter to
coder templates push
?
m
what is the difference between making a typo with or without
--create
parameter? In our use case it is not possible to have a typo as it gets executed in a GitHub action.
k
We are also thinking about the cli command
I was thinking of just combining the template init and template create commands
If there is a main.tf in that folder then upload the template
If not, then show the example templates
b
I think we should start with https://github.com/coder/coder/issues/6851
Super ideal for CI
k
I have no issue 👍
As long as I can still do everything in the cli, just as before!