You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: A parameter with human region names and icons
4
+
icon: ../../../../.icons/digital-ocean.svg
5
+
verified: true
6
+
tags: [helper, parameter, digitalocean, regions]
7
+
---
8
+
9
+
# DigitalOcean Region
10
+
11
+
This module adds DigitalOcean regions to your Coder template with automatic GPU filtering. You can customize display names and icons using the `custom_names` and `custom_icons` arguments.
This module automatically exposes a "GPU-only regions" checkbox in the template UI. When checked, it shows only GPU-capable regions and auto-selects the first one. When unchecked, it shows all available regions.
59
+
60
+
## Available Regions
61
+
62
+
Refer to DigitalOcean’s official availability matrix for the most up-to-date information.
63
+
64
+
- GPU availability: currently only in `nyc2` and `tor1` (per DO docs). Others are non-GPU.
-`nyc2` - New York, United States (Legacy) - **GPU available**
70
+
-`tor1` - Toronto, Canada - **GPU available**
71
+
-`nyc3` - New York, United States
72
+
-`ams3` - Amsterdam, Netherlands
73
+
-`sfo3` - San Francisco, United States
74
+
-`sgp1` - Singapore
75
+
-`lon1` - London, United Kingdom
76
+
-`fra1` - Frankfurt, Germany
77
+
-`blr1` - Bangalore, India
78
+
-`syd1` - Sydney, Australia
79
+
-`atl1` - Atlanta, United States
80
+
-`nyc1` - New York, United States (Legacy)
81
+
-`sfo2` - San Francisco, United States (Legacy)
82
+
-`sfo1` - San Francisco, United States (Legacy)
83
+
-`ams2` - Amsterdam, Netherlands (Legacy)
84
+
85
+
## Associated template
86
+
87
+
Also see the Coder template registry for a [DigitalOcean Droplet template](https://registry.coder.com/templates/digitalocean-droplet) that provisions workspaces as DigitalOcean Droplets.
default="The region to deploy workspace infrastructure."
20
+
description="The description of the parameter."
21
+
type=string
22
+
}
23
+
24
+
variable"default" {
25
+
default=null
26
+
description="Default region"
27
+
type=string
28
+
}
29
+
30
+
31
+
32
+
variable"mutable" {
33
+
default=false
34
+
description="Whether the parameter can be changed after creation."
35
+
type=bool
36
+
}
37
+
38
+
variable"custom_names" {
39
+
default={}
40
+
description="A map of custom display names for region IDs."
41
+
type=map(string)
42
+
}
43
+
44
+
variable"custom_icons" {
45
+
default={}
46
+
description="A map of custom icons for region IDs."
47
+
type=map(string)
48
+
}
49
+
50
+
variable"single_zone_per_region" {
51
+
default=true
52
+
description="Whether to only include a single zone per region."
53
+
type=bool
54
+
}
55
+
56
+
variable"coder_parameter_order" {
57
+
type=number
58
+
description="The order determines the position of a template parameter in the UI/CLI presentation. The lowest order is shown first and parameters with equal order are sorted by name (ascending order)."
59
+
default=null
60
+
}
61
+
62
+
data"coder_parameter""gpu_only" {
63
+
name="digitalocean_gpu_only"
64
+
display_name="GPU-only regions"
65
+
description="Show only regions with GPUs"
66
+
type="bool"
67
+
form_type="checkbox"
68
+
default=false
69
+
mutable=var.mutable
70
+
order=var.coder_parameter_order
71
+
}
72
+
73
+
locals {
74
+
zones={
75
+
# Active datacenters (recommended for new workloads)
76
+
"nyc1"= {
77
+
gpu =false
78
+
name ="New York City, USA (NYC1)"
79
+
icon ="/emojis/1f1fa-1f1f8.png"
80
+
}
81
+
"nyc3"= {
82
+
gpu =false
83
+
name ="New York City, USA (NYC3)"
84
+
icon ="/emojis/1f1fa-1f1f8.png"
85
+
}
86
+
"ams3"= {
87
+
gpu =false
88
+
name ="Amsterdam, Netherlands"
89
+
icon ="/emojis/1f1f3-1f1f1.png"
90
+
}
91
+
"sfo3"= {
92
+
gpu =false
93
+
name ="San Francisco, USA"
94
+
icon ="/emojis/1f1fa-1f1f8.png"
95
+
}
96
+
"sgp1"= {
97
+
gpu =false
98
+
name ="Singapore"
99
+
icon ="/emojis/1f1f8-1f1ec.png"
100
+
}
101
+
"lon1"= {
102
+
gpu =false
103
+
name ="London, United Kingdom"
104
+
icon ="/emojis/1f1ec-1f1e7.png"
105
+
}
106
+
"fra1"= {
107
+
gpu =false
108
+
name ="Frankfurt, Germany"
109
+
icon ="/emojis/1f1e9-1f1ea.png"
110
+
}
111
+
"tor1"= {
112
+
gpu =true
113
+
name ="Toronto, Canada"
114
+
icon ="/emojis/1f1e8-1f1e6.png"
115
+
}
116
+
"blr1"= {
117
+
gpu =false
118
+
name ="Bangalore, India"
119
+
icon ="/emojis/1f1ee-1f1f3.png"
120
+
}
121
+
"syd1"= {
122
+
gpu =false
123
+
name ="Sydney, Australia"
124
+
icon ="/emojis/1f1e6-1f1fa.png"
125
+
}
126
+
"atl1"= {
127
+
gpu =false
128
+
name ="Atlanta, USA"
129
+
icon ="/emojis/1f1fa-1f1f8.png"
130
+
}
131
+
# Legacy/Restricted datacenters (not recommended for new workloads)
132
+
"nyc2"= {
133
+
gpu =true# GPU available but restricted to existing users
134
+
name ="New York City, USA (Legacy)"
135
+
icon ="/emojis/1f1fa-1f1f8.png"
136
+
}
137
+
"sfo2"= {
138
+
gpu =false# No GPU available per current regional availability
0 commit comments