File tree 2 files changed +25
-4
lines changed
2 files changed +25
-4
lines changed Original file line number Diff line number Diff line change @@ -38,9 +38,20 @@ variable "step2_arch" {
38
38
}
39
39
sensitive = true
40
40
}
41
+ variable "step3_OS" {
42
+ description = <<- EOF
43
+ What operating system is your Coder host on?
44
+ EOF
45
+
46
+ validation {
47
+ condition = contains ([" MacOS" , " Windows" , " Linux" ], var. step3_OS )
48
+ error_message = " Value must be MacOS, Windows, or Linux."
49
+ }
50
+ sensitive = true
51
+ }
41
52
42
53
provider "docker" {
43
- host = " unix:///var/run/docker.sock"
54
+ host = var . step3_OS == " Windows " ? " npipe:////.//pipe//docker_engine " : " unix:///var/run/docker.sock"
44
55
}
45
56
46
57
provider "coder" {
Original file line number Diff line number Diff line change @@ -17,8 +17,6 @@ terraform {
17
17
# host on the "docker" provider below.
18
18
variable "step1_docker_host_warning" {
19
19
description = <<- EOF
20
- Is Docker running on the Coder host?
21
-
22
20
This template will use the Docker socket present on
23
21
the Coder host, which is not necessarily your local machine.
24
22
@@ -45,10 +43,22 @@ variable "step2_arch" {
45
43
}
46
44
sensitive = true
47
45
}
46
+ variable "step3_OS" {
47
+ description = <<- EOF
48
+ What operating system is your Coder host on?
49
+ EOF
50
+
51
+ validation {
52
+ condition = contains ([" MacOS" , " Windows" , " Linux" ], var. step3_OS )
53
+ error_message = " Value must be MacOS, Windows, or Linux."
54
+ }
55
+ sensitive = true
56
+ }
48
57
49
58
provider "docker" {
50
- host = " unix:///var/run/docker.sock"
59
+ host = var . step3_OS == " Windows " ? " npipe:////.//pipe//docker_engine " : " unix:///var/run/docker.sock"
51
60
}
61
+
52
62
provider "coder" {
53
63
}
54
64
You can’t perform that action at this time.
0 commit comments