@@ -313,6 +313,62 @@ data "coder_parameter" "project_id" {
313
313
}
314
314
```
315
315
316
+ ## Workspace presets
317
+
318
+ Workspace presets allow you to configure commonly used combinations of parameters
319
+ into a single option, which makes it easier for developers to pick one that fits
320
+ their needs.
321
+
322
+ 
323
+
324
+ Use `coder_workspace_preset` to define the preset parameters.
325
+ After you save the template file, the presets will be available for all new
326
+ workspace deployments.
327
+
328
+ <details><summary>Expand for an example</summary>
329
+
330
+ ```tf
331
+ data "coder_workspace_preset" "goland-gpu" {
332
+ name = "GoLand with GPU"
333
+ parameters = {
334
+ "machine_type" = "n1-standard-1"
335
+ "attach_gpu" = "true"
336
+ "gcp_region" = "europe-west4-c"
337
+ "jetbrains_ide" = "GO"
338
+ }
339
+ }
340
+
341
+ data "coder_parameter" "machine_type" {
342
+ name = "machine_type"
343
+ display_name = "Machine Type"
344
+ type = "string"
345
+ default = "n1-standard-2"
346
+ }
347
+
348
+ data "coder_parameter" "attach_gpu" {
349
+ name = "attach_gpu"
350
+ display_name = "Attach GPU?"
351
+ type = "bool"
352
+ default = "false"
353
+ }
354
+
355
+ data "coder_parameter" "gcp_region" {
356
+ name = "gcp_region"
357
+ display_name = "Machine Type"
358
+ type = "string"
359
+ default = "n1-standard-2"
360
+ }
361
+
362
+ data "coder_parameter" "jetbrains_ide" {
363
+ name = "jetbrains_ide"
364
+ display_name = "Machine Type"
365
+ type = "string"
366
+ default = "n1-standard-2"
367
+ }
368
+ ```
369
+
370
+ </details>
371
+
316
372
## Create Autofill
317
373
318
374
When the template doesn' t specify default values, Coder may still autofill
0 commit comments