Skip to content

docs(templates): add edit templates section #4754

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

Merged
merged 2 commits into from
Oct 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion docs/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ coder templates init
vim <template-name>/main.tf

# add the template to Coder deployment
coder templates <create/update> <template-name>
coder templates create <template-name>
```

> See the documentation and source code for each example in the
Expand Down Expand Up @@ -220,6 +220,32 @@ 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:

```sh
coder templates pull <template-name> file.tar.gz
```

This will pull down the template as a gzipped file to your current directory. Then unzip
it by running:

```sh
tar -xf file.tar.gz
```

Make the changes to your template then run this command from the root of the template folder:

```sh
coder templates push <template-name>
```

Your updated template will now be available. Outdated workspaces will have a prompt in the dashboard to update.

### Delete templates

You can delete a template using both the coder CLI and UI. Only
Expand Down