File tree Expand file tree Collapse file tree 1 file changed +22
-7
lines changed Expand file tree Collapse file tree 1 file changed +22
-7
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,19 @@ terraform {
13
13
14
14
# User parameters
15
15
16
+ variable "region" {
17
+ type = string
18
+ description = " Which region to deploy to."
19
+ default = " us-pittsburgh"
20
+ validation {
21
+ condition = contains ([" us-pittsburgh" , " eu-helsinki" , " ap-sydney" ], var. region )
22
+ error_message = " Region must be one of us-pittsburg, eu-helsinki, or ap-sydney."
23
+ }
24
+ }
25
+
16
26
variable "dotfiles_uri" {
17
27
type = string
18
28
description = <<- EOF
19
- default = ""
20
29
Dotfiles repo URI (optional)
21
30
22
31
see https://dotfiles.github.io
@@ -30,17 +39,23 @@ variable "datocms_api_token" {
30
39
default = " "
31
40
}
32
41
33
- # Admin parameters
42
+ locals {
43
+ // These are Tailscale IP addresses. Ask Dean or Kyle for help.
44
+ docker_host = {
45
+ " " = " tcp://100.94.74.63:2375"
46
+ " us-pittsburgh" = " tcp://100.94.74.63:2375"
47
+ " eu-helsinki" = " tcp://100.117.102.81:2375"
48
+ " ap-sydney" = " tcp://100.127.2.1:2375"
49
+ }
50
+ }
34
51
35
52
provider "docker" {
36
- host = " unix:/// var/run/dogfood-docker.sock "
53
+ host = lookup (local . docker_host , var. region )
37
54
}
38
55
39
- provider "coder" {
40
- }
56
+ provider "coder" {}
41
57
42
- data "coder_workspace" "me" {
43
- }
58
+ data "coder_workspace" "me" {}
44
59
45
60
resource "coder_agent" "dev" {
46
61
arch = " amd64"
You can’t perform that action at this time.
0 commit comments