File tree Expand file tree Collapse file tree 3 files changed +44
-0
lines changed
registry/coder-labs/templates/externally-managed-workspace Expand file tree Collapse file tree 3 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ display_name : Externally Managed Workspace
3+ description : A template for externally managed workspaces
4+ icon : ../../../../.icons/paperclip-emoji.svg
5+ verified : true
6+ tags : [external]
7+ ---
8+
9+ # Externally Managed Workspace Template
10+
11+ This template provides a minimal scaffolding for creating Coder workspaces that connect to externally provisioned compute resources.
12+
13+ Use this template as a starting point to build your own custom templates for scenarios where you need to connect to existing infrastructure.
Original file line number Diff line number Diff line change 1+ terraform {
2+ required_providers {
3+ coder = {
4+ source = " coder/coder"
5+ }
6+ }
7+ }
8+
9+ data "coder_workspace" "me" {}
10+
11+ resource "coder_agent" "main" {
12+ arch = " amd64"
13+ os = " linux"
14+ }
15+
16+ resource "coder_external_agent" "main" {
17+ agent_id = coder_agent. main . id
18+ }
19+
20+ # Adds code-server
21+ # See all available modules at https://registry.coder.com/modules
22+ module "code-server" {
23+ count = data. coder_workspace . me . start_count
24+ source = " registry.coder.com/coder/code-server/coder"
25+
26+ # This ensures that the latest non-breaking version of the module gets downloaded, you can also pin the module version to prevent breaking changes in production.
27+ version = " ~> 1.0"
28+
29+ agent_id = coder_agent. main . id
30+ }
You can’t perform that action at this time.
0 commit comments