A parameter with all Exoscale instance types. This allows developers to select their desired virtual machine for the workspace.
Customize the preselected parameter value:
1module "exoscale-instance-type" { 2 source = "registry.coder.com/modules/exoscale-instance-type/coder" 3 version = "1.0.12" 4 default = "standard.medium" 5} 6 7resource "exoscale_compute_instance" "instance" { 8 type = module.exoscale-instance-type.value 9 # ... 10} 11 12resource "coder_metadata" "workspace_info" { 13 item { 14 key = "instance type" 15 value = module.exoscale-instance-type.name 16 } 17}
Change the display name a type using the corresponding maps:
1module "exoscale-instance-type" { 2 source = "registry.coder.com/modules/exoscale-instance-type/coder" 3 version = "1.0.12" 4 default = "standard.medium" 5 6 custom_names = { 7 "standard.medium" : "Mittlere Instanz" # German translation 8 } 9 10 custom_descriptions = { 11 "standard.medium" : "4 GB Arbeitsspeicher, 2 Kerne, 10 - 400 GB Festplatte" # German translation 12 } 13} 14 15resource "exoscale_compute_instance" "instance" { 16 type = module.exoscale-instance-type.value 17 # ... 18} 19 20resource "coder_metadata" "workspace_info" { 21 item { 22 key = "instance type" 23 value = module.exoscale-instance-type.name 24 } 25}
Show only gpu1 types
1module "exoscale-instance-type" { 2 source = "registry.coder.com/modules/exoscale-instance-type/coder" 3 version = "1.0.12" 4 default = "gpu.large" 5 type_category = ["gpu"] 6 exclude = [ 7 "gpu2.small", 8 "gpu2.medium", 9 "gpu2.large", 10 "gpu2.huge", 11 "gpu3.small", 12 "gpu3.medium", 13 "gpu3.large", 14 "gpu3.huge" 15 ] 16} 17 18resource "exoscale_compute_instance" "instance" { 19 type = module.exoscale-instance-type.value 20 # ... 21} 22 23resource "coder_metadata" "workspace_info" { 24 item { 25 key = "instance type" 26 value = module.exoscale-instance-type.name 27 } 28}
A related exoscale template will be provided soon.