File tree Expand file tree Collapse file tree 2 files changed +43
-4
lines changed
templates/azure-windows-ad-auth Expand file tree Collapse file tree 2 files changed +43
-4
lines changed Original file line number Diff line number Diff line change @@ -72,3 +72,22 @@ Register-ScheduledTask @task -Force
72
72
# Additional Chocolatey package installs (optional, uncomment to enable)
73
73
# choco feature enable -n=allowGlobalConfirmation
74
74
# choco install visualstudio2022community --package-parameters "--add=Microsoft.VisualStudio.Workload.ManagedDesktop;includeRecommended --passive --locale en-US"
75
+
76
+ # Download and extract Microsoft VS Code Server
77
+ # Define the URL of the VS Code binary
78
+ $url = " https://update.code.visualstudio.com/latest/win32-x64-archive/stable"
79
+
80
+ # Define the path where the binary will be downloaded
81
+ $downloadPath = " $env:TEMP\VSCode.zip"
82
+
83
+ # Download the VS Code binary
84
+ Invoke- WebRequest - Uri $url - OutFile $downloadPath
85
+
86
+ # Define the path where the binary will be extracted
87
+ $extractPath = " C:\VSCode"
88
+
89
+ # Extract the VS Code binary
90
+ Expand- Archive - Path $downloadPath - DestinationPath $extractPath - Force
91
+
92
+ # Add the directory to the system's PATH
93
+ $env: Path + = " ;$extractPath"
Original file line number Diff line number Diff line change @@ -25,10 +25,14 @@ provider "coder" {
25
25
data "coder_workspace" "me" {}
26
26
27
27
resource "coder_agent" "main" {
28
- count = data. coder_workspace . me . transition == " start" ? 1 : 0
29
- arch = " amd64"
30
- auth = " azure-instance-identity"
31
- os = " windows"
28
+ count = data. coder_workspace . me . transition == " start" ? 1 : 0
29
+ arch = " amd64"
30
+ auth = " azure-instance-identity"
31
+ os = " windows"
32
+ startup_script = <<- EOT
33
+ code serve-web --without-connection-token
34
+
35
+ EOT
32
36
33
37
metadata {
34
38
key = " cpu"
@@ -53,6 +57,22 @@ resource "coder_agent" "main" {
53
57
}
54
58
}
55
59
60
+ resource "coder_app" "code-server" {
61
+ agent_id = coder_agent. main . id
62
+ slug = " vs-code-server"
63
+ display_name = " vs-code-server"
64
+ url = " http://localhost:8000"
65
+ icon = " /icon/code.svg"
66
+ subdomain = false
67
+ share = " owner"
68
+
69
+ healthcheck {
70
+ url = " http://localhost:8000/healthz"
71
+ interval = 5
72
+ threshold = 6
73
+ }
74
+ }
75
+
56
76
# Generate random password for default user
57
77
resource "random_password" "admin_password" {
58
78
length = 16
You can’t perform that action at this time.
0 commit comments