-
Notifications
You must be signed in to change notification settings - Fork 896
feat: add template export functionality to UI #17890
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
// @Param template path string true "Template ID" format(uuid) | ||
// @Success 200 {file} binary "Template archive" | ||
// @Router /templates/{template}/export [get] | ||
func (api *API) exportTemplate(rw http.ResponseWriter, r *http.Request) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this new endpoint necessary? coder templates pull
just calls api/v2/files/{fileID}
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we could use the files endpoint for this feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Keerthi421 thanks for the contribution. During the review I have identified a few required changes:
- There is no need to implement a new endpoint. You can use the one pointed by @ethanndickson in the previous comment.
- It is always nice to include a screenshot or short video showing up the feature.
- There are a few failed checks that need to be solved before approval.
Please, let me know if you need any help with these. Happy to help.
This PR adds the ability to export templates directly from the Coder UI, making it easier for users to backup, share, and version control their template configurations.
Changes
/api/v2/templates/{template}/export
endpoint that:main.tf
with the template's Terraform configurationREADME.md
with the template's descriptionRelated Issues
Closes #17859