Workspaces as code (WAC) brings the infrastructure as code paradigm to Coder workspaces. WAC allows you to define and create new workspaces using workspace templates.
Workspace templates are declarative YAML files that describe
how to configure workspaces and their supporting infrastructure. Coder supports
files with either the
.coder/<template-name>.yamlfile exists in your repository.
You can find a fully populated workspace template and descriptions of each field in our syntax guide.
To create a new workspace using a template, go to New Workspace > Create from Template.
When prompted, provide:
coder.yamlconfiguration file. See Workspace templates for more information about these files
.coder/coder.yaml, but if you choose a different path, provide it here
To make it easy for your developers to use your template, you can generate an embeddable Markdown button for use in your repo. See the admin guide for details.