Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
0afb18e
feat: add pre-install plugins support
Harsh9485 Feb 28, 2026
f0d55e1
fix: typos
Harsh9485 Feb 28, 2026
d5852fd
fix: update version
Harsh9485 Feb 28, 2026
2562d2a
Merge branch 'main' into Pre-install-jetBrains-Plugins-Support-(Insta…
DevelopmentCats Mar 2, 2026
0fe965a
Merge branch 'main' into Pre-install-jetBrains-Plugins-Support-(Insta…
Harsh9485 Mar 9, 2026
28b75d5
Merge branch 'main' into Pre-install-jetBrains-Plugins-Support-(Insta…
Harsh9485 Mar 10, 2026
79a852f
feat|fix: add check_plugins_installed and mark_plugins_installed, and…
Harsh9485 Mar 10, 2026
d7667b1
Merge branch 'Pre-install-jetBrains-Plugins-Support-(InstallPlugins)'…
Harsh9485 Mar 10, 2026
85077e2
fix: the plugins variable and style
Harsh9485 Mar 10, 2026
0a94145
Merge branch 'main' into Pre-install-jetBrains-Plugins-Support-(Insta…
Harsh9485 Mar 10, 2026
d4ebd2d
fix: script throws an error if any IDE plugins remain uninstalled
Harsh9485 Mar 10, 2026
15c7a43
Merge branch 'Pre-install-jetBrains-Plugins-Support-(InstallPlugins)'…
Harsh9485 Mar 10, 2026
998c677
fix: log duplication and add warning that some plugins are disabled b…
Harsh9485 Mar 11, 2026
6af22cc
fix: change the location of CONFIG_DIR
Harsh9485 Mar 11, 2026
a2aa95a
docs: improve wording in README
Harsh9485 Mar 11, 2026
58bd453
Merge branch 'main' into Pre-install-jetBrains-Plugins-Support-(Insta…
Harsh9485 Mar 11, 2026
7f445eb
Merge branch 'main' into Pre-install-jetBrains-Plugins-Support-(Insta…
Harsh9485 Mar 13, 2026
25cf7ee
fix: make script compatible with all distributions
Harsh9485 Mar 13, 2026
d7e2314
Merge branch 'Pre-install-jetBrains-Plugins-Support-(InstallPlugins)'…
Harsh9485 Mar 13, 2026
9a9fca9
Merge branch 'main' into Pre-install-jetBrains-Plugins-Support-(Insta…
Harsh9485 Mar 13, 2026
1d82a88
Merge branch 'main' into Pre-install-jetBrains-Plugins-Support-(Insta…
Harsh9485 Mar 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 49 additions & 7 deletions registry/coder/modules/jetbrains/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This module adds JetBrains IDE buttons to launch IDEs directly from the dashboar
module "jetbrains" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/jetbrains/coder"
version = "1.3.0"
version = "1.4.0"
agent_id = coder_agent.main.id
folder = "/home/coder/project"
}
Expand All @@ -39,7 +39,7 @@ When `default` contains IDE codes, those IDEs are created directly without user
module "jetbrains" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/jetbrains/coder"
version = "1.3.0"
version = "1.4.0"
agent_id = coder_agent.main.id
folder = "/home/coder/project"
default = ["PY", "IU"] # Pre-configure PyCharm and IntelliJ IDEA
Expand All @@ -52,7 +52,7 @@ module "jetbrains" {
module "jetbrains" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/jetbrains/coder"
version = "1.3.0"
version = "1.4.0"
agent_id = coder_agent.main.id
folder = "/home/coder/project"
# Show parameter with limited options
Expand All @@ -66,7 +66,7 @@ module "jetbrains" {
module "jetbrains" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/jetbrains/coder"
version = "1.3.0"
version = "1.4.0"
agent_id = coder_agent.main.id
folder = "/home/coder/project"
default = ["IU", "PY"]
Expand All @@ -81,7 +81,7 @@ module "jetbrains" {
module "jetbrains" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/jetbrains/coder"
version = "1.3.0"
version = "1.4.0"
agent_id = coder_agent.main.id
folder = "/workspace/project"

Expand All @@ -108,7 +108,7 @@ module "jetbrains" {
module "jetbrains_pycharm" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/jetbrains/coder"
version = "1.3.0"
version = "1.4.0"
agent_id = coder_agent.main.id
folder = "/workspace/project"

Expand All @@ -128,14 +128,56 @@ Add helpful tooltip text that appears when users hover over the IDE app buttons:
module "jetbrains" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/jetbrains/coder"
version = "1.3.0"
version = "1.4.0"
agent_id = coder_agent.main.id
folder = "/home/coder/project"
default = ["IU", "PY"]
tooltip = "You need to install [JetBrains Toolbox App](https://www.jetbrains.com/toolbox-app/) to use this button."
}
```

### Plugin Auto‑Installer

This module now supports automatic JetBrains plugin installation inside your workspace.

To get a plugin ID, open the plugin’s page on the JetBrains Marketplace. Scroll down to Additional Information and look for Plugin ID. Use that value in the configuration below.

```tf
module "jetbrains" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/jetbrains/coder"
version = "1.2.1"
agent_id = coder_agent.main.id
folder = "/home/coder/project"
default = ["IU", "PY"]

jetbrains_plugins = {
"PY" = ["com.koxudaxi.pydantic", "com.intellij.kubernetes"]
"IU" = ["<Plugin-ID>", "<Plugin-ID>"]
"WS" = ["<Plugin-ID>", "<Plugin-ID>"]
"GO" = ["<Plugin-ID>", "<Plugin-ID>"]
"CL" = ["<Plugin-ID>", "<Plugin-ID>"]
"PS" = ["<Plugin-ID>", "<Plugin-ID>"]
"RD" = ["<Plugin-ID>", "<Plugin-ID>"]
"RM" = ["<Plugin-ID>", "<Plugin-ID>"]
"RR" = ["<Plugin-ID>", "<Plugin-ID>"]
}
}
```

> [!IMPORTANT]
> After installing the IDE, restart the workspace.
> When the workspace starts again, the scripts will detect the installed IDE and automatically install the configured plugins.
>
> This module prerequisites and limitations
>
> 1. Requires JetBrains Toolbox to be installed
> 2. Requires jq to be available
> 3. only works in a Linux environment.

> [!WARNING]
> Some plugins are disabled by default due to JetBrains security defaults, so you might need to enable them manually.

### Accessing the IDE Metadata

You can now reference the output `ide_metadata` as a map.
Expand Down
34 changes: 34 additions & 0 deletions registry/coder/modules/jetbrains/jetbrains.tftest.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -351,3 +351,37 @@ run "validate_output_schema" {
error_message = "The ide_metadata output schema has changed. Please update the 'main.tf' and this test."
}
}

run "no_plugin_script_when_plugins_empty" {
command = plan

variables {
agent_id = "foo"
folder = "/home/coder"
default = ["PY"]
jetbrains_plugins = {}
}

assert {
condition = length(resource.coder_script.install_jetbrains_plugins) == 0
error_message = "Expected no plugin install script when plugins list is empty"
}
}

run "plugin_script_created_when_plugins_provided" {
command = plan

variables {
agent_id = "foo"
folder = "/home/coder"
default = ["PY"]
jetbrains_plugins = {
"PY" = ["com.koxudaxi.pydantic", "com.intellij.kubernetes"]
}
}

assert {
condition = length(resource.coder_script.install_jetbrains_plugins) == 1
error_message = "Expected script to be created when plugins are provided"
}
}
34 changes: 34 additions & 0 deletions registry/coder/modules/jetbrains/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,12 @@ variable "ide_config" {
}
}

variable "jetbrains_plugins" {
type = map(list(string))
description = "Map of IDE product codes to plugin ID lists. Example: { IU = [\"com.foo\"], GO = [\"org.bar\"] }."
default = {}
}

locals {
# Parse HTTP responses once with error handling for air-gapped environments
parsed_responses = {
Expand Down Expand Up @@ -214,6 +220,10 @@ locals {

# Convert the parameter value to a set for for_each
selected_ides = length(var.default) == 0 ? toset(jsondecode(coalesce(data.coder_parameter.jetbrains_ides[0].value, "[]"))) : toset(var.default)

plugin_map_b64 = base64encode(jsonencode(var.jetbrains_plugins))

plugin_install_script = file("${path.module}/scripts/install_plugins.sh")
}

data "coder_parameter" "jetbrains_ides" {
Expand Down Expand Up @@ -241,6 +251,30 @@ data "coder_parameter" "jetbrains_ides" {
data "coder_workspace" "me" {}
data "coder_workspace_owner" "me" {}

resource "coder_script" "install_jetbrains_plugins" {
count = length(var.jetbrains_plugins) > 0 ? 1 : 0
agent_id = var.agent_id
display_name = "Install JetBrains Plugins"
run_on_start = true

script = <<-EOT
#!/bin/bash
set -o errexit
set -o pipefail

CONFIG_DIR="$HOME/.config/Jetbrains"

mkdir -p "$CONFIG_DIR"
echo -n "${local.plugin_map_b64}" | base64 -d > "$CONFIG_DIR/plugins.json"
chmod 600 "$CONFIG_DIR/plugins.json"

echo -n '${base64encode(local.plugin_install_script)}' | base64 -d > /tmp/install_plugins.sh
chmod +x /tmp/install_plugins.sh

/tmp/install_plugins.sh > /tmp/install_plugins.log 2>&1
EOT
}

resource "coder_app" "jetbrains" {
for_each = local.selected_ides
agent_id = var.agent_id
Expand Down
Loading
Loading