- Notifications
You must be signed in to change notification settings - Fork1k
chore(dogfood): add IDE selection parameter#19194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
7 commits Select commitHold shift + click to select a range
ac15f0c
chore(dogfood): add IDE selection parameter
matifali8a4ea25
Update dogfood/coder/main.tf
matifali2882c9e
Merge branch 'main' into atif/ide-chooser
matifali5789411
typo
matifali119caee
Merge branch 'main' into atif/ide-chooser
matifali1123780
Update main.tf
matifalid709652
apply suggestions
matifaliFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
88 changes: 80 additions & 8 deletionsdogfood/coder/main.tf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -175,7 +175,6 @@ locals { | ||
], ["us-pittsburgh"])[0] | ||
} | ||
data "coder_parameter" "region" { | ||
type = "string" | ||
name = "Region" | ||
@@ -277,6 +276,74 @@ data "coder_workspace_tags" "tags" { | ||
} | ||
} | ||
data "coder_parameter" "ide_choices" { | ||
type = "list(string)" | ||
name = "Select IDEs" | ||
form_type = "multi-select" | ||
mutable = true | ||
description = "Choose one or more IDEs to enable in your workspace" | ||
default = jsonencode(["vscode", "code-server", "cursor"]) | ||
option { | ||
name = "VS Code Desktop" | ||
value = "vscode" | ||
icon = "/icon/code.svg" | ||
} | ||
option { | ||
name = "code-server" | ||
value = "code-server" | ||
icon = "/icon/code.svg" | ||
} | ||
option { | ||
name = "VS Code Web" | ||
value = "vscode-web" | ||
icon = "/icon/code.svg" | ||
} | ||
option { | ||
name = "JetBrains IDEs" | ||
value = "jetbrains" | ||
icon = "/icon/jetbrains.svg" | ||
} | ||
option { | ||
name = "JetBrains Fleet" | ||
value = "fleet" | ||
icon = "/icon/fleet.svg" | ||
} | ||
option { | ||
name = "Cursor" | ||
value = "cursor" | ||
icon = "/icon/cursor.svg" | ||
} | ||
option { | ||
name = "Windsurf" | ||
value = "windsurf" | ||
icon = "/icon/windsurf.svg" | ||
} | ||
option { | ||
name = "Zed" | ||
value = "zed" | ||
icon = "/icon/zed.svg" | ||
} | ||
} | ||
data "coder_parameter" "vscode_channel" { | ||
count = contains(jsondecode(data.coder_parameter.ide_choices.value), "vscode") ? 1 : 0 | ||
type = "string" | ||
name = "VS Code Desktop channel" | ||
description = "Choose the VS Code Desktop channel" | ||
mutable = true | ||
default = "stable" | ||
option { | ||
value = "stable" | ||
name = "Stable" | ||
icon = "/icon/code.svg" | ||
} | ||
option { | ||
value = "insiders" | ||
name = "Insiders" | ||
icon = "/icon/code-insiders.svg" | ||
} | ||
} | ||
module "slackme" { | ||
count = data.coder_workspace.me.start_count | ||
source = "dev.registry.coder.com/coder/slackme/coder" | ||
@@ -309,7 +376,7 @@ module "personalize" { | ||
} | ||
module "code-server" { | ||
count =contains(jsondecode(data.coder_parameter.ide_choices.value), "code-server") ? data.coder_workspace.me.start_count : 0 | ||
source = "dev.registry.coder.com/coder/code-server/coder" | ||
version = "1.3.1" | ||
agent_id = coder_agent.dev.id | ||
@@ -319,7 +386,7 @@ module "code-server" { | ||
} | ||
module "vscode-web" { | ||
count =contains(jsondecode(data.coder_parameter.ide_choices.value), "vscode-web") ? data.coder_workspace.me.start_count : 0 | ||
source = "dev.registry.coder.com/coder/vscode-web/coder" | ||
version = "1.3.1" | ||
agent_id = coder_agent.dev.id | ||
@@ -331,7 +398,7 @@ module "vscode-web" { | ||
} | ||
module "jetbrains" { | ||
count =contains(jsondecode(data.coder_parameter.ide_choices.value), "jetbrains") ? data.coder_workspace.me.start_count : 0 | ||
source = "dev.registry.coder.com/coder/jetbrains/coder" | ||
version = "1.0.3" | ||
agent_id = coder_agent.dev.id | ||
@@ -356,23 +423,23 @@ module "coder-login" { | ||
} | ||
module "cursor" { | ||
count =contains(jsondecode(data.coder_parameter.ide_choices.value), "cursor") ? data.coder_workspace.me.start_count : 0 | ||
source = "dev.registry.coder.com/coder/cursor/coder" | ||
version = "1.3.0" | ||
agent_id = coder_agent.dev.id | ||
folder = local.repo_dir | ||
} | ||
module "windsurf" { | ||
count =contains(jsondecode(data.coder_parameter.ide_choices.value), "windsurf") ? data.coder_workspace.me.start_count : 0 | ||
source = "dev.registry.coder.com/coder/windsurf/coder" | ||
version = "1.1.1" | ||
agent_id = coder_agent.dev.id | ||
folder = local.repo_dir | ||
} | ||
module "zed" { | ||
count =contains(jsondecode(data.coder_parameter.ide_choices.value), "zed") ? data.coder_workspace.me.start_count : 0 | ||
source = "dev.registry.coder.com/coder/zed/coder" | ||
version = "1.1.0" | ||
agent_id = coder_agent.dev.id | ||
@@ -381,7 +448,7 @@ module "zed" { | ||
} | ||
module "jetbrains-fleet" { | ||
count =contains(jsondecode(data.coder_parameter.ide_choices.value), "fleet") ? data.coder_workspace.me.start_count : 0 | ||
source = "registry.coder.com/coder/jetbrains-fleet/coder" | ||
version = "1.0.1" | ||
agent_id = coder_agent.dev.id | ||
@@ -423,6 +490,11 @@ resource "coder_agent" "dev" { | ||
} | ||
startup_script_behavior = "blocking" | ||
display_apps { | ||
vscode = contains(jsondecode(data.coder_parameter.ide_choices.value), "vscode") && try(data.coder_parameter.vscode_channel[0].value, "stable") == "stable" | ||
vscode_insiders = contains(jsondecode(data.coder_parameter.ide_choices.value), "vscode") && try(data.coder_parameter.vscode_channel[0].value, "stable") == "insiders" | ||
cursor[bot] marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
} | ||
# The following metadata blocks are optional. They are used to display | ||
# information about your workspace in the dashboard. You can remove them | ||
# if you don't want to display any information. | ||
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.