chore: deprecate template create command in favor of template push (#11390)

This commit is contained in:
Garrett Delfosse
2024-01-05 21:04:14 +00:00
committed by GitHub
parent 3d54bc06f6
commit b21da38bea
42 changed files with 498 additions and 420 deletions
+3 -3
View File
@@ -64,11 +64,11 @@ the [Helm example](#example-running-an-external-provisioner-with-helm) below.
# In another terminal, create/push
# a template that requires this provisioner
coder templates create on-prem \
coder templates push on-prem \
--provisioner-tag environment=on_prem
# Or, match the provisioner exactly
coder templates create on-prem-chicago \
coder templates push on-prem-chicago \
--provisioner-tag environment=on_prem \
--provisioner-tag data_center=chicago
```
@@ -88,7 +88,7 @@ the [Helm example](#example-running-an-external-provisioner-with-helm) below.
# In another terminal, create/push
# a template that requires user provisioners
coder templates create on-prem \
coder templates push on-prem \
--provisioner-tag scope=user
```
+13 -16
View File
@@ -18,29 +18,26 @@ coder templates
```console
Templates are written in standard Terraform and describe the infrastructure for workspaces
- Create a template for developers to create workspaces:
$ coder templates create
- Make changes to your template, and plan the changes:
$ coder templates plan my-template
- Push an update to the template. Your developers can update their workspaces:
- Create or push an update to the template. Your developers can update their
workspaces:
$ coder templates push my-template
```
## Subcommands
| Name | Purpose |
| ------------------------------------------------ | ------------------------------------------------------------------------------ |
| [<code>archive</code>](./templates_archive.md) | Archive unused or failed template versions from a given template(s) |
| [<code>create</code>](./templates_create.md) | Create a template from the current directory or as specified by flag |
| [<code>delete</code>](./templates_delete.md) | Delete templates |
| [<code>edit</code>](./templates_edit.md) | Edit the metadata of a template by name. |
| [<code>init</code>](./templates_init.md) | Get started with a templated template. |
| [<code>list</code>](./templates_list.md) | List all the templates available for the organization |
| [<code>pull</code>](./templates_pull.md) | Download the active, latest, or specified version of a template to a path. |
| [<code>push</code>](./templates_push.md) | Push a new template version from the current directory or as specified by flag |
| [<code>versions</code>](./templates_versions.md) | Manage different versions of the specified template |
| Name | Purpose |
| ------------------------------------------------ | -------------------------------------------------------------------------------- |
| [<code>archive</code>](./templates_archive.md) | Archive unused or failed template versions from a given template(s) |
| [<code>create</code>](./templates_create.md) | DEPRECATED: Create a template from the current directory or as specified by flag |
| [<code>delete</code>](./templates_delete.md) | Delete templates |
| [<code>edit</code>](./templates_edit.md) | Edit the metadata of a template by name. |
| [<code>init</code>](./templates_init.md) | Get started with a templated template. |
| [<code>list</code>](./templates_list.md) | List all the templates available for the organization |
| [<code>pull</code>](./templates_pull.md) | Download the active, latest, or specified version of a template to a path. |
| [<code>push</code>](./templates_push.md) | Create or update a template from the current directory or as specified by flag |
| [<code>versions</code>](./templates_versions.md) | Manage different versions of the specified template |
+1 -1
View File
@@ -2,7 +2,7 @@
# templates create
Create a template from the current directory or as specified by flag
DEPRECATED: Create a template from the current directory or as specified by flag
## Usage
+9
View File
@@ -130,6 +130,15 @@ Edit the template maximum time before shutdown - workspaces created from this te
Edit the template name.
### --private
| | |
| ------- | ------------------ |
| Type | <code>bool</code> |
| Default | <code>false</code> |
Disable the default behavior of granting template access to the 'everyone' group. The template permissions must be updated to allow non-admin users to use this template.
### --require-active-version
| | |
+1 -10
View File
@@ -2,7 +2,7 @@
# templates push
Push a new template version from the current directory or as specified by flag
Create or update a template from the current directory or as specified by flag
## Usage
@@ -29,15 +29,6 @@ Whether the new template will be marked active.
Always prompt all parameters. Does not pull parameter values from active template version.
### --create
| | |
| ------- | ------------------ |
| Type | <code>bool</code> |
| Default | <code>false</code> |
Create the template if it does not exist.
### -d, --directory
| | |
+1 -1
View File
@@ -322,7 +322,7 @@ Edit `main.tf` and update the following fields of the Kubernetes pod resource:
Finally, create the template:
```console
coder template create kubernetes -d .
coder template push kubernetes -d .
```
This template should be ready to use straight away.
+2 -2
View File
@@ -892,7 +892,7 @@
},
{
"title": "templates create",
"description": "Create a template from the current directory or as specified by flag",
"description": "DEPRECATED: Create a template from the current directory or as specified by flag",
"path": "cli/templates_create.md"
},
{
@@ -922,7 +922,7 @@
},
{
"title": "templates push",
"description": "Push a new template version from the current directory or as specified by flag",
"description": "Create or update a template from the current directory or as specified by flag",
"path": "cli/templates_push.md"
},
{
+1 -1
View File
@@ -128,7 +128,7 @@ Navigate to the `./azure-linux` folder where you created your template and run
the following command to put the template on your Coder instance.
```shell
coder templates create
coder templates push
```
Congrats! You can now navigate to your Coder dashboard and use this Linux on
+1 -1
View File
@@ -52,7 +52,7 @@ Coder with Docker has the following advantages:
cd docker
```
1. Push up the template with `coder templates create`
1. Push up the template with `coder templates push`
1. Open the dashboard in your browser to create your first workspace:
@@ -211,7 +211,7 @@ export CLUSTER_SERVICEACCOUNT_TOKEN=$(kubectl get secrets coder-v2 -n coder-work
Create the template with these values:
```shell
coder templates create \
coder templates push \
--variable host=$CLUSTER_ADDRESS \
--variable cluster_ca_certificate=$CLUSTER_CA_CERTIFICATE \
--variable token=$CLUSTER_SERVICEACCOUNT_TOKEN \
@@ -228,7 +228,7 @@ kubectl cluster-info
# Get cluster CA and token (base64 encoded)
kubectl get secrets coder-service-account-token -n coder-workspaces -o jsonpath="{.data}"
coder templates create \
coder templates push \
--variable host=API_ADDRESS \
--variable cluster_ca_certificate=CLUSTER_CA_CERTIFICATE \
--variable token=CLUSTER_SERVICEACCOUNT_TOKEN \