Skip to content

Commit 4b174db

Browse files
Emyrkmatifali
andauthored
Update dogfood/coder/main.tf
Co-authored-by: Atif Ali <atif@coder.com>
1 parent fa38ef4 commit 4b174db

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

dogfood/coder/main.tf

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -140,15 +140,10 @@ locals {
140140
}
141141

142142
user_groups = data.coder_workspace_owner.me.groups
143-
user_region = try(
144-
local.default_regions[
145-
one([
146-
for g in local.user_groups : g
147-
if contains(keys(local.default_regions), g)
148-
])
149-
],
150-
"us-pittsburgh" # fallback value if no group matches
151-
)
143+
user_region = coalescelist([
144+
for g in local.user_groups :
145+
local.default_regions[g] if contains(keys(local.default_regions), g)
146+
], ["us-pittsburgh"])[0]
152147
}
153148

154149

0 commit comments

Comments
 (0)