Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit985fac6

Browse files
authored
chore: combine dogfood regions, use tailscale (#5741)
1 parent145d101 commit985fac6

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

‎dogfood/main.tf

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,19 @@ terraform {
1313

1414
# User parameters
1515

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+
1626
variable"dotfiles_uri" {
1727
type=string
1828
description=<<-EOF
19-
default = ""
2029
Dotfiles repo URI (optional)
2130
2231
see https://dotfiles.github.io
@@ -30,17 +39,23 @@ variable "datocms_api_token" {
3039
default=""
3140
}
3241

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+
}
3451

3552
provider"docker" {
36-
host="unix:///var/run/dogfood-docker.sock"
53+
host=lookup(local.docker_host,var.region)
3754
}
3855

39-
provider"coder" {
40-
}
56+
provider"coder" {}
4157

42-
data"coder_workspace""me" {
43-
}
58+
data"coder_workspace""me" {}
4459

4560
resource"coder_agent""dev" {
4661
arch="amd64"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp