Templates and Github
Is it at all possible to push changes made to templates via Coder’s template editor UI to Github? There’s documentation (https://coder.com/docs/v2/latest/templates/change-management and https://coder.com/blog/keeping-templates-up-to-date) about using CI/CD to push changes to git-managed templates to Coder. Since editing templates is possible via the UI, is it possible to push changes made in the UI to Github?
Change management - Coder v2 Docs
Versioning templates with git and CI
14 Replies
<#1210411409209294870>
Category
Help needed
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
No currently it's not possible.
But I agree that it would be a nice to have
Are the templates on the filesystem of the Coder host (considering OSS v2). If so where are they located?
They are in the postgresdb.
Nothing is on filesystem
it's currently not implemented but maybe you can hack together something that will periodically pull the template and push to GH
or you can also implement a CI/CD workflow that will check if changes have been done on the instance whenever a PR is opened
Would be useful to have a webhook from coder on template change that triggers these flows
On a related note , coder template push isn’t as far as I can tell idempotent? If the template file is unchanged it still creates a new version?
I'm not sure but it probably doesn't care yes
you can pull and compare maybe ?
It doesn’t seem to care if the template was actually changed. It just creates a new version.
yeah that's not surprising
do you need it to care ?
It would make some things simpler ( managing all my templates in one gitlab project ) but not critical
It would be nice if we can just link a mono repo anc coder can laod all templates from it
2-way sync would be a nice to have
I love the ability to update the TF and Docker buildfile from the UI. it's great for adding little things on the fly. But agree there needs to be some way to sync these changes to a repository.
@Bob, I think you should open a feature request issue in the repo
GitHub
Issues · coder/coder
Provision remote development environments via Terraform - Issues · coder/coder