From 54549a71bc26e637021ae6e782cb65a902a4e593 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Tue, 25 Oct 2022 20:38:10 +0000 Subject: [PATCH 1/2] docs(templates): add edit templates section --- docs/templates.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/docs/templates.md b/docs/templates.md index 096442677bcb2..284389212da8e 100644 --- a/docs/templates.md +++ b/docs/templates.md @@ -220,6 +220,33 @@ resource "kubernetes_pod" "podName" { } ``` +### Edit templates + +You can delete a template using the coder CLI. Only +[template admins and owners](./admin/users.md) can edit a template. + +Using the CLI, login to Coder and run the following command to delete a template: + +```console +coder templates pull file.tar.gz +``` + +This will pull down the template as a gzipped file to your current directory. Then unzip +it by running: + +```console +tar -xf +``` + +Make the changes to your template then run this command from the root of the template folder: + +```console +coder templates push +``` + +Your updated template will now be available in the UI for new workspaces. +Previously created workspaces will see a button to update as well. + ### Delete templates You can delete a template using both the coder CLI and UI. Only From 970611a38a4cf1b40e8922f067e7aab7aec95fb4 Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 26 Oct 2022 18:04:34 +0000 Subject: [PATCH 2/2] minor changes --- docs/templates.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/templates.md b/docs/templates.md index 284389212da8e..9c81789197c16 100644 --- a/docs/templates.md +++ b/docs/templates.md @@ -22,7 +22,7 @@ coder templates init vim /main.tf # add the template to Coder deployment -coder templates +coder templates create ``` > See the documentation and source code for each example in the @@ -227,25 +227,24 @@ You can delete a template using the coder CLI. Only Using the CLI, login to Coder and run the following command to delete a template: -```console +```sh coder templates pull file.tar.gz ``` This will pull down the template as a gzipped file to your current directory. Then unzip it by running: -```console -tar -xf +```sh +tar -xf file.tar.gz ``` Make the changes to your template then run this command from the root of the template folder: -```console +```sh coder templates push ``` -Your updated template will now be available in the UI for new workspaces. -Previously created workspaces will see a button to update as well. +Your updated template will now be available. Outdated workspaces will have a prompt in the dashboard to update. ### Delete templates