@@ -18,54 +18,71 @@ terraform {
1818variable "namespace" {
1919 type = string
2020 description = " The Kubernetes namespace to create workspaces in (must exist prior to creating workspaces). If the Coder host is itself running as a Pod on the same Kubernetes cluster as you are deploying workspaces to, set this to the same namespace."
21+ default = " coder"
2122}
2223
24+ variable "anthropic_model" {
25+ type = string
26+ description = " The AWS Inference profile ID of the base Anthropic model to use with Claude Code"
27+ default = " global.anthropic.claude-sonnet-4-5-20250929-v1:0"
28+ }
29+
30+ variable "anthropic_small_fast_model" {
31+ type = string
32+ description = " The AWS Inference profile ID of the small fast Anthropic model to use with Claude Code"
33+ default = " global.anthropic.claude-haiku-4-5-20251001-v1:0"
34+ }
35+
36+ locals {
37+ home_dir = " /home/coder"
38+ }
39+
40+ # Minimum vCPUs needed
2341data "coder_parameter" "cpu" {
24- name = " cpu"
25- display_name = " CPU"
26- description = " The number of CPU cores"
27- default = " 2"
28- icon = " /icon/memory.svg"
29- mutable = true
30- option {
31- name = " 2 Cores"
32- value = " 2"
33- }
34- option {
35- name = " 4 Cores"
36- value = " 4"
42+ name = " CPU cores"
43+ type = " number"
44+ description = " CPU cores for your individual workspace"
45+ icon = " https://png.pngtree.com/png-clipart/20191122/original/pngtree-processor-icon-png-image_5165793.jpg"
46+ validation {
47+ min = 2
48+ max = 8
3749 }
50+ form_type = " input"
51+ mutable = true
52+ default = 4
53+ order = 1
3854}
3955
56+ # Minimum GB memory needed
4057data "coder_parameter" "memory" {
41- name = " memory"
42- display_name = " Memory"
43- description = " The amount of memory in GB"
44- default = " 2"
45- icon = " /icon/memory.svg"
46- mutable = true
47- option {
48- name = " 2 GB"
49- value = " 2"
50- }
51- option {
52- name = " 4 GB"
53- value = " 4"
58+ name = " Memory (__ GB)"
59+ type = " number"
60+ description = " Memory (__ GB) for your individual workspace"
61+ icon = " https://www.vhv.rs/dpng/d/33-338595_random-access-memory-logo-hd-png-download.png"
62+ validation {
63+ min = 4
64+ max = 16
5465 }
66+ form_type = " input"
67+ mutable = true
68+ default = 8
69+ order = 2
5570}
5671
57- data "coder_parameter" "home_disk_size" {
58- name = " home_disk_size"
59- display_name = " Home disk size"
60- description = " The size of the home disk in GB"
61- default = " 10"
62- type = " number"
63- icon = " /emojis/1f4be.png"
64- mutable = false
72+ data "coder_parameter" "disk_size" {
73+ name = " PVC storage size"
74+ type = " number"
75+ description = " Number of GB of storage for '${ local . home_dir } '! This will persist after the workspace's K8s Pod is shutdown or deleted."
76+ icon = " https://www.pngall.com/wp-content/uploads/5/Database-Storage-PNG-Clipart.png"
6577 validation {
66- min = 1
67- max = 99999
78+ min = 10
79+ max = 50
80+ monotonic = " increasing"
6881 }
82+ form_type = " slider"
83+ mutable = true
84+ default = 10
85+ order = 3
6986}
7087
7188data "coder_parameter" "ai_prompt" {
@@ -88,8 +105,8 @@ resource "coder_agent" "dev" {
88105 CODER_MCP_CLAUDE_TASK_PROMPT = local.task_prompt
89106 CODER_MCP_CLAUDE_SYSTEM_PROMPT = local.system_prompt
90107 CLAUDE_CODE_USE_BEDROCK = " 1" ,
91- ANTHROPIC_MODEL = " us.anthropic.claude-3-7-sonnet-20250219-v1:0 " ,
92- ANTHROPIC_SMALL_FAST_MODEL = " us.anthropic.claude-3-5-haiku-20241022-v1:0 " ,
108+ ANTHROPIC_MODEL = var.anthropic_model ,
109+ ANTHROPIC_SMALL_FAST_MODEL = var.anthropic_small_fast_model ,
93110 CODER_MCP_APP_STATUS_SLUG = " claude-code"
94111 }
95112 display_apps {
@@ -102,23 +119,22 @@ resource "coder_agent" "dev" {
102119
103120module "coder-login" {
104121 source = " registry.coder.com/coder/coder-login/coder"
105- version = " 1.0.15 "
122+ version = " 1.1.0 "
106123 agent_id = coder_agent. dev . id
107124}
108125
109- module "vscode-web " {
110- source = " registry.coder.com/coder/vscode-web /coder"
111- version = " 1.2.0 "
126+ module "code-server " {
127+ source = " registry.coder.com/coder/code-server /coder"
128+ version = " 1.3.1 "
112129 agent_id = coder_agent. dev . id
113130 folder = local. home_folder
114- accept_license = true
115131 subdomain = false
116132 order = 0
117133}
118134
119135module "kiro" {
120- source = " registry.coder.com/coder/kiro/coder"
121- version = " 1.0 .0"
136+ source = " registry.coder.com/coder/kiro/coder"
137+ version = " 1.1 .0"
122138 agent_id = coder_agent. dev . id
123139 order = 1
124140}
@@ -164,7 +180,6 @@ resource "coder_app" "preview" {
164180
165181locals {
166182 cost = 2
167- region = " us-east-2"
168183 home_folder = " /home/coder"
169184}
170185
@@ -240,7 +255,7 @@ resource "kubernetes_persistent_volume_claim" "home" {
240255 access_modes = [" ReadWriteOnce" ]
241256 resources {
242257 requests = {
243- storage = " ${ data . coder_parameter . home_disk_size . value } Gi"
258+ storage = " ${ data . coder_parameter . disk_size . value } Gi"
244259 }
245260 }
246261 }
0 commit comments