feat: add group attributes to all modules (#123)
Goes along with https://github.com/coder/coder/issues/8237 Most people probably gets apps from modules, and so to group them we'll need new versions of aaaaaall of these modules. Also some were missing `order`, which is related and intertwined pretty closely in the implementation of `group`, so add it where necessary.
This commit is contained in:
parent
67b27550cd
commit
8e051a8e2c
@ -15,7 +15,7 @@ tags: [helper]
|
|||||||
module "MODULE_NAME" {
|
module "MODULE_NAME" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/NAMESPACE/MODULE_NAME/coder"
|
source = "registry.coder.com/NAMESPACE/MODULE_NAME/coder"
|
||||||
version = "1.0.2"
|
version = "1.0.0"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ Install the Dracula theme from [OpenVSX](https://open-vsx.org/):
|
|||||||
module "MODULE_NAME" {
|
module "MODULE_NAME" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/NAMESPACE/MODULE_NAME/coder"
|
source = "registry.coder.com/NAMESPACE/MODULE_NAME/coder"
|
||||||
version = "1.0.2"
|
version = "1.0.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
extensions = [
|
extensions = [
|
||||||
"dracula-theme.theme-dracula"
|
"dracula-theme.theme-dracula"
|
||||||
@ -49,7 +49,7 @@ Configure VS Code's [settings.json](https://code.visualstudio.com/docs/getstarte
|
|||||||
module "MODULE_NAME" {
|
module "MODULE_NAME" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/NAMESPACE/MODULE_NAME/coder"
|
source = "registry.coder.com/NAMESPACE/MODULE_NAME/coder"
|
||||||
version = "1.0.2"
|
version = "1.0.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
extensions = ["dracula-theme.theme-dracula"]
|
extensions = ["dracula-theme.theme-dracula"]
|
||||||
settings = {
|
settings = {
|
||||||
@ -65,7 +65,7 @@ Run code-server in the background, don't fetch it from GitHub:
|
|||||||
```tf
|
```tf
|
||||||
module "MODULE_NAME" {
|
module "MODULE_NAME" {
|
||||||
source = "registry.coder.com/NAMESPACE/MODULE_NAME/coder"
|
source = "registry.coder.com/NAMESPACE/MODULE_NAME/coder"
|
||||||
version = "1.0.2"
|
version = "1.0.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
offline = true
|
offline = true
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,7 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
coder = {
|
coder = {
|
||||||
source = "coder/coder"
|
source = "coder/coder"
|
||||||
version = ">= 0.17"
|
version = ">= 2.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -105,4 +105,3 @@ data "coder_parameter" "MODULE_NAME" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,7 @@ Run [Aider](https://aider.chat) AI pair programming in your workspace. This modu
|
|||||||
```tf
|
```tf
|
||||||
module "aider" {
|
module "aider" {
|
||||||
source = "registry.coder.com/coder/aider/coder"
|
source = "registry.coder.com/coder/aider/coder"
|
||||||
version = "1.0.1"
|
version = "1.1.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -69,7 +69,7 @@ variable "anthropic_api_key" {
|
|||||||
module "aider" {
|
module "aider" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/aider/coder"
|
source = "registry.coder.com/coder/aider/coder"
|
||||||
version = "1.0.1"
|
version = "1.1.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
ai_api_key = var.anthropic_api_key
|
ai_api_key = var.anthropic_api_key
|
||||||
}
|
}
|
||||||
@ -94,7 +94,7 @@ variable "openai_api_key" {
|
|||||||
module "aider" {
|
module "aider" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/aider/coder"
|
source = "registry.coder.com/coder/aider/coder"
|
||||||
version = "1.0.1"
|
version = "1.1.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
use_tmux = true
|
use_tmux = true
|
||||||
ai_provider = "openai"
|
ai_provider = "openai"
|
||||||
@ -115,7 +115,7 @@ variable "custom_api_key" {
|
|||||||
module "aider" {
|
module "aider" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/aider/coder"
|
source = "registry.coder.com/coder/aider/coder"
|
||||||
version = "1.0.1"
|
version = "1.1.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
ai_provider = "custom"
|
ai_provider = "custom"
|
||||||
custom_env_var_name = "MY_CUSTOM_API_KEY"
|
custom_env_var_name = "MY_CUSTOM_API_KEY"
|
||||||
@ -132,7 +132,7 @@ You can extend Aider's capabilities by adding custom extensions:
|
|||||||
module "aider" {
|
module "aider" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/aider/coder"
|
source = "registry.coder.com/coder/aider/coder"
|
||||||
version = "1.0.1"
|
version = "1.1.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
ai_api_key = var.anthropic_api_key
|
ai_api_key = var.anthropic_api_key
|
||||||
|
|
||||||
@ -211,7 +211,7 @@ data "coder_parameter" "ai_prompt" {
|
|||||||
module "aider" {
|
module "aider" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/aider/coder"
|
source = "registry.coder.com/coder/aider/coder"
|
||||||
version = "1.0.1"
|
version = "1.1.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
ai_api_key = var.anthropic_api_key
|
ai_api_key = var.anthropic_api_key
|
||||||
task_prompt = data.coder_parameter.ai_prompt.value
|
task_prompt = data.coder_parameter.ai_prompt.value
|
||||||
|
|||||||
@ -4,7 +4,7 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
coder = {
|
coder = {
|
||||||
source = "coder/coder"
|
source = "coder/coder"
|
||||||
version = ">= 0.17"
|
version = ">= 2.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -24,6 +24,12 @@ variable "order" {
|
|||||||
default = null
|
default = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "group" {
|
||||||
|
type = string
|
||||||
|
description = "The name of a group that this app belongs to."
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
variable "icon" {
|
variable "icon" {
|
||||||
type = string
|
type = string
|
||||||
description = "The icon to use for the app."
|
description = "The icon to use for the app."
|
||||||
@ -224,17 +230,17 @@ resource "coder_script" "aider" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo "Setting up Aider AI pair programming..."
|
echo "Setting up Aider AI pair programming..."
|
||||||
|
|
||||||
if [ "${var.use_screen}" = "true" ] && [ "${var.use_tmux}" = "true" ]; then
|
if [ "${var.use_screen}" = "true" ] && [ "${var.use_tmux}" = "true" ]; then
|
||||||
echo "Error: Both use_screen and use_tmux cannot be enabled at the same time."
|
echo "Error: Both use_screen and use_tmux cannot be enabled at the same time."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p "${var.folder}"
|
mkdir -p "${var.folder}"
|
||||||
|
|
||||||
if [ "$(uname)" = "Linux" ]; then
|
if [ "$(uname)" = "Linux" ]; then
|
||||||
echo "Checking dependencies for Linux..."
|
echo "Checking dependencies for Linux..."
|
||||||
|
|
||||||
if [ "${var.use_tmux}" = "true" ]; then
|
if [ "${var.use_tmux}" = "true" ]; then
|
||||||
if ! command_exists tmux; then
|
if ! command_exists tmux; then
|
||||||
echo "Installing tmux for persistent sessions..."
|
echo "Installing tmux for persistent sessions..."
|
||||||
@ -296,7 +302,7 @@ resource "coder_script" "aider" {
|
|||||||
|
|
||||||
if [ "${var.install_aider}" = "true" ]; then
|
if [ "${var.install_aider}" = "true" ]; then
|
||||||
echo "Installing Aider..."
|
echo "Installing Aider..."
|
||||||
|
|
||||||
if ! command_exists python3 || ! command_exists pip3; then
|
if ! command_exists python3 || ! command_exists pip3; then
|
||||||
echo "Installing Python dependencies required for Aider..."
|
echo "Installing Python dependencies required for Aider..."
|
||||||
if command -v apt-get >/dev/null 2>&1; then
|
if command -v apt-get >/dev/null 2>&1; then
|
||||||
@ -319,37 +325,37 @@ resource "coder_script" "aider" {
|
|||||||
else
|
else
|
||||||
echo "Python is already installed, skipping installation."
|
echo "Python is already installed, skipping installation."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! command_exists aider; then
|
if ! command_exists aider; then
|
||||||
curl -LsSf https://aider.chat/install.sh | sh
|
curl -LsSf https://aider.chat/install.sh | sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "$HOME/.bashrc" ]; then
|
if [ -f "$HOME/.bashrc" ]; then
|
||||||
if ! grep -q 'export PATH="$HOME/bin:$PATH"' "$HOME/.bashrc"; then
|
if ! grep -q 'export PATH="$HOME/bin:$PATH"' "$HOME/.bashrc"; then
|
||||||
echo 'export PATH="$HOME/bin:$PATH"' >> "$HOME/.bashrc"
|
echo 'export PATH="$HOME/bin:$PATH"' >> "$HOME/.bashrc"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "$HOME/.zshrc" ]; then
|
if [ -f "$HOME/.zshrc" ]; then
|
||||||
if ! grep -q 'export PATH="$HOME/bin:$PATH"' "$HOME/.zshrc"; then
|
if ! grep -q 'export PATH="$HOME/bin:$PATH"' "$HOME/.zshrc"; then
|
||||||
echo 'export PATH="$HOME/bin:$PATH"' >> "$HOME/.zshrc"
|
echo 'export PATH="$HOME/bin:$PATH"' >> "$HOME/.zshrc"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${local.encoded_post_install_script}" ]; then
|
if [ -n "${local.encoded_post_install_script}" ]; then
|
||||||
echo "Running post-install script..."
|
echo "Running post-install script..."
|
||||||
echo "${local.encoded_post_install_script}" | base64 -d > /tmp/post_install.sh
|
echo "${local.encoded_post_install_script}" | base64 -d > /tmp/post_install.sh
|
||||||
chmod +x /tmp/post_install.sh
|
chmod +x /tmp/post_install.sh
|
||||||
/tmp/post_install.sh
|
/tmp/post_install.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${var.experiment_report_tasks}" = "true" ]; then
|
if [ "${var.experiment_report_tasks}" = "true" ]; then
|
||||||
echo "Configuring Aider to report tasks via Coder MCP..."
|
echo "Configuring Aider to report tasks via Coder MCP..."
|
||||||
|
|
||||||
mkdir -p "$HOME/.config/aider"
|
mkdir -p "$HOME/.config/aider"
|
||||||
|
|
||||||
cat > "$HOME/.config/aider/config.yml" << EOL
|
cat > "$HOME/.config/aider/config.yml" << EOL
|
||||||
${trimspace(local.combined_extensions)}
|
${trimspace(local.combined_extensions)}
|
||||||
EOL
|
EOL
|
||||||
@ -357,29 +363,29 @@ EOL
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Starting persistent Aider session..."
|
echo "Starting persistent Aider session..."
|
||||||
|
|
||||||
touch "$HOME/.aider.log"
|
touch "$HOME/.aider.log"
|
||||||
|
|
||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
export LC_ALL=en_US.UTF-8
|
export LC_ALL=en_US.UTF-8
|
||||||
|
|
||||||
export PATH="$HOME/bin:$PATH"
|
export PATH="$HOME/bin:$PATH"
|
||||||
|
|
||||||
if [ "${var.use_tmux}" = "true" ]; then
|
if [ "${var.use_tmux}" = "true" ]; then
|
||||||
if [ -n "${var.task_prompt}" ]; then
|
if [ -n "${var.task_prompt}" ]; then
|
||||||
echo "Running Aider with message in tmux session..."
|
echo "Running Aider with message in tmux session..."
|
||||||
|
|
||||||
# Configure tmux for shared sessions
|
# Configure tmux for shared sessions
|
||||||
if [ ! -f "$HOME/.tmux.conf" ]; then
|
if [ ! -f "$HOME/.tmux.conf" ]; then
|
||||||
echo "Creating ~/.tmux.conf with shared session settings..."
|
echo "Creating ~/.tmux.conf with shared session settings..."
|
||||||
echo "set -g mouse on" > "$HOME/.tmux.conf"
|
echo "set -g mouse on" > "$HOME/.tmux.conf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! grep -q "^set -g mouse on$" "$HOME/.tmux.conf"; then
|
if ! grep -q "^set -g mouse on$" "$HOME/.tmux.conf"; then
|
||||||
echo "Adding 'set -g mouse on' to ~/.tmux.conf..."
|
echo "Adding 'set -g mouse on' to ~/.tmux.conf..."
|
||||||
echo "set -g mouse on" >> "$HOME/.tmux.conf"
|
echo "set -g mouse on" >> "$HOME/.tmux.conf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Starting Aider using ${var.ai_provider} provider and model: ${var.ai_model}"
|
echo "Starting Aider using ${var.ai_provider} provider and model: ${var.ai_model}"
|
||||||
tmux new-session -d -s ${var.session_name} -c ${var.folder} "export ${local.env_var_name}=\"${var.ai_api_key}\"; aider --architect --yes-always ${local.model_flag} ${var.ai_model} --message \"${local.combined_prompt}\""
|
tmux new-session -d -s ${var.session_name} -c ${var.folder} "export ${local.env_var_name}=\"${var.ai_api_key}\"; aider --architect --yes-always ${local.model_flag} ${var.ai_model} --message \"${local.combined_prompt}\""
|
||||||
echo "Aider task started in tmux session '${var.session_name}'. Check the UI for progress."
|
echo "Aider task started in tmux session '${var.session_name}'. Check the UI for progress."
|
||||||
@ -389,12 +395,12 @@ EOL
|
|||||||
echo "Creating ~/.tmux.conf with shared session settings..."
|
echo "Creating ~/.tmux.conf with shared session settings..."
|
||||||
echo "set -g mouse on" > "$HOME/.tmux.conf"
|
echo "set -g mouse on" > "$HOME/.tmux.conf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! grep -q "^set -g mouse on$" "$HOME/.tmux.conf"; then
|
if ! grep -q "^set -g mouse on$" "$HOME/.tmux.conf"; then
|
||||||
echo "Adding 'set -g mouse on' to ~/.tmux.conf..."
|
echo "Adding 'set -g mouse on' to ~/.tmux.conf..."
|
||||||
echo "set -g mouse on" >> "$HOME/.tmux.conf"
|
echo "set -g mouse on" >> "$HOME/.tmux.conf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Starting Aider using ${var.ai_provider} provider and model: ${var.ai_model}"
|
echo "Starting Aider using ${var.ai_provider} provider and model: ${var.ai_model}"
|
||||||
tmux new-session -d -s ${var.session_name} -c ${var.folder} "export ${local.env_var_name}=\"${var.ai_api_key}\"; aider --architect --yes-always ${local.model_flag} ${var.ai_model} --message \"${var.system_prompt}\""
|
tmux new-session -d -s ${var.session_name} -c ${var.folder} "export ${local.env_var_name}=\"${var.ai_api_key}\"; aider --architect --yes-always ${local.model_flag} ${var.ai_model} --message \"${var.system_prompt}\""
|
||||||
echo "Tmux session '${var.session_name}' started. Access it by clicking the Aider button."
|
echo "Tmux session '${var.session_name}' started. Access it by clicking the Aider button."
|
||||||
@ -402,12 +408,12 @@ EOL
|
|||||||
else
|
else
|
||||||
if [ -n "${var.task_prompt}" ]; then
|
if [ -n "${var.task_prompt}" ]; then
|
||||||
echo "Running Aider with message in screen session..."
|
echo "Running Aider with message in screen session..."
|
||||||
|
|
||||||
if [ ! -f "$HOME/.screenrc" ]; then
|
if [ ! -f "$HOME/.screenrc" ]; then
|
||||||
echo "Creating ~/.screenrc and adding multiuser settings..."
|
echo "Creating ~/.screenrc and adding multiuser settings..."
|
||||||
echo -e "multiuser on\nacladd $(whoami)" > "$HOME/.screenrc"
|
echo -e "multiuser on\nacladd $(whoami)" > "$HOME/.screenrc"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! grep -q "^multiuser on$" "$HOME/.screenrc"; then
|
if ! grep -q "^multiuser on$" "$HOME/.screenrc"; then
|
||||||
echo "Adding 'multiuser on' to ~/.screenrc..."
|
echo "Adding 'multiuser on' to ~/.screenrc..."
|
||||||
echo "multiuser on" >> "$HOME/.screenrc"
|
echo "multiuser on" >> "$HOME/.screenrc"
|
||||||
@ -417,7 +423,7 @@ EOL
|
|||||||
echo "Adding 'acladd $(whoami)' to ~/.screenrc..."
|
echo "Adding 'acladd $(whoami)' to ~/.screenrc..."
|
||||||
echo "acladd $(whoami)" >> "$HOME/.screenrc"
|
echo "acladd $(whoami)" >> "$HOME/.screenrc"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Starting Aider using ${var.ai_provider} provider and model: ${var.ai_model}"
|
echo "Starting Aider using ${var.ai_provider} provider and model: ${var.ai_model}"
|
||||||
screen -U -dmS ${var.session_name} bash -c "
|
screen -U -dmS ${var.session_name} bash -c "
|
||||||
cd ${var.folder}
|
cd ${var.folder}
|
||||||
@ -426,15 +432,15 @@ EOL
|
|||||||
aider --architect --yes-always ${local.model_flag} ${var.ai_model} --message \"${local.combined_prompt}\"
|
aider --architect --yes-always ${local.model_flag} ${var.ai_model} --message \"${local.combined_prompt}\"
|
||||||
/bin/bash
|
/bin/bash
|
||||||
"
|
"
|
||||||
|
|
||||||
echo "Aider task started in screen session '${var.session_name}'. Check the UI for progress."
|
echo "Aider task started in screen session '${var.session_name}'. Check the UI for progress."
|
||||||
else
|
else
|
||||||
|
|
||||||
if [ ! -f "$HOME/.screenrc" ]; then
|
if [ ! -f "$HOME/.screenrc" ]; then
|
||||||
echo "Creating ~/.screenrc and adding multiuser settings..."
|
echo "Creating ~/.screenrc and adding multiuser settings..."
|
||||||
echo -e "multiuser on\nacladd $(whoami)" > "$HOME/.screenrc"
|
echo -e "multiuser on\nacladd $(whoami)" > "$HOME/.screenrc"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! grep -q "^multiuser on$" "$HOME/.screenrc"; then
|
if ! grep -q "^multiuser on$" "$HOME/.screenrc"; then
|
||||||
echo "Adding 'multiuser on' to ~/.screenrc..."
|
echo "Adding 'multiuser on' to ~/.screenrc..."
|
||||||
echo "multiuser on" >> "$HOME/.screenrc"
|
echo "multiuser on" >> "$HOME/.screenrc"
|
||||||
@ -444,7 +450,7 @@ EOL
|
|||||||
echo "Adding 'acladd $(whoami)' to ~/.screenrc..."
|
echo "Adding 'acladd $(whoami)' to ~/.screenrc..."
|
||||||
echo "acladd $(whoami)" >> "$HOME/.screenrc"
|
echo "acladd $(whoami)" >> "$HOME/.screenrc"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Starting Aider using ${var.ai_provider} provider and model: ${var.ai_model}"
|
echo "Starting Aider using ${var.ai_provider} provider and model: ${var.ai_model}"
|
||||||
screen -U -dmS ${var.session_name} bash -c "
|
screen -U -dmS ${var.session_name} bash -c "
|
||||||
cd ${var.folder}
|
cd ${var.folder}
|
||||||
@ -456,7 +462,7 @@ EOL
|
|||||||
echo "Screen session '${var.session_name}' started. Access it by clicking the Aider button."
|
echo "Screen session '${var.session_name}' started. Access it by clicking the Aider button."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Aider setup complete!"
|
echo "Aider setup complete!"
|
||||||
EOT
|
EOT
|
||||||
run_on_start = true
|
run_on_start = true
|
||||||
@ -471,12 +477,12 @@ resource "coder_app" "aider_cli" {
|
|||||||
command = <<-EOT
|
command = <<-EOT
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
export PATH="$HOME/bin:$HOME/.local/bin:$PATH"
|
export PATH="$HOME/bin:$HOME/.local/bin:$PATH"
|
||||||
|
|
||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
export LC_ALL=en_US.UTF-8
|
export LC_ALL=en_US.UTF-8
|
||||||
|
|
||||||
if [ "${var.use_tmux}" = "true" ]; then
|
if [ "${var.use_tmux}" = "true" ]; then
|
||||||
if tmux has-session -t ${var.session_name} 2>/dev/null; then
|
if tmux has-session -t ${var.session_name} 2>/dev/null; then
|
||||||
echo "Attaching to existing Aider tmux session..."
|
echo "Attaching to existing Aider tmux session..."
|
||||||
@ -499,4 +505,5 @@ resource "coder_app" "aider_cli" {
|
|||||||
fi
|
fi
|
||||||
EOT
|
EOT
|
||||||
order = var.order
|
order = var.order
|
||||||
|
group = var.group
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,7 +19,7 @@ Enable DCV Server and Web Client on Windows workspaces.
|
|||||||
module "dcv" {
|
module "dcv" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/amazon-dcv-windows/coder"
|
source = "registry.coder.com/coder/amazon-dcv-windows/coder"
|
||||||
version = "1.0.24"
|
version = "1.1.0"
|
||||||
agent_id = resource.coder_agent.main.id
|
agent_id = resource.coder_agent.main.id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,11 +4,23 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
coder = {
|
coder = {
|
||||||
source = "coder/coder"
|
source = "coder/coder"
|
||||||
version = ">= 0.17"
|
version = ">= 2.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "order" {
|
||||||
|
type = number
|
||||||
|
description = "The order determines the position of app in the UI presentation. The lowest order is shown first and apps with equal order are sorted by name (ascending order)."
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "group" {
|
||||||
|
type = string
|
||||||
|
description = "The name of a group that this app belongs to."
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
variable "agent_id" {
|
variable "agent_id" {
|
||||||
type = string
|
type = string
|
||||||
description = "The ID of a Coder agent."
|
description = "The ID of a Coder agent."
|
||||||
@ -45,6 +57,8 @@ resource "coder_app" "web-dcv" {
|
|||||||
url = "https://localhost:${var.port}${local.web_url_path}?username=${local.admin_username}&password=${var.admin_password}"
|
url = "https://localhost:${var.port}${local.web_url_path}?username=${local.admin_username}&password=${var.admin_password}"
|
||||||
icon = "/icon/dcv.svg"
|
icon = "/icon/dcv.svg"
|
||||||
subdomain = var.subdomain
|
subdomain = var.subdomain
|
||||||
|
order = var.order
|
||||||
|
group = var.group
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "coder_script" "install-dcv" {
|
resource "coder_script" "install-dcv" {
|
||||||
|
|||||||
@ -14,7 +14,7 @@ Run [Amazon Q](https://aws.amazon.com/q/) in your workspace to access Amazon's A
|
|||||||
```tf
|
```tf
|
||||||
module "amazon-q" {
|
module "amazon-q" {
|
||||||
source = "registry.coder.com/coder/amazon-q/coder"
|
source = "registry.coder.com/coder/amazon-q/coder"
|
||||||
version = "1.0.1"
|
version = "1.1.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
# Required: see below for how to generate
|
# Required: see below for how to generate
|
||||||
experiment_auth_tarball = var.amazon_q_auth_tarball
|
experiment_auth_tarball = var.amazon_q_auth_tarball
|
||||||
@ -82,7 +82,7 @@ module "amazon-q" {
|
|||||||
```tf
|
```tf
|
||||||
module "amazon-q" {
|
module "amazon-q" {
|
||||||
source = "registry.coder.com/coder/amazon-q/coder"
|
source = "registry.coder.com/coder/amazon-q/coder"
|
||||||
version = "1.0.1"
|
version = "1.1.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
experiment_auth_tarball = var.amazon_q_auth_tarball
|
experiment_auth_tarball = var.amazon_q_auth_tarball
|
||||||
experiment_use_tmux = true
|
experiment_use_tmux = true
|
||||||
@ -94,7 +94,7 @@ module "amazon-q" {
|
|||||||
```tf
|
```tf
|
||||||
module "amazon-q" {
|
module "amazon-q" {
|
||||||
source = "registry.coder.com/coder/amazon-q/coder"
|
source = "registry.coder.com/coder/amazon-q/coder"
|
||||||
version = "1.0.1"
|
version = "1.1.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
experiment_auth_tarball = var.amazon_q_auth_tarball
|
experiment_auth_tarball = var.amazon_q_auth_tarball
|
||||||
experiment_report_tasks = true
|
experiment_report_tasks = true
|
||||||
@ -106,7 +106,7 @@ module "amazon-q" {
|
|||||||
```tf
|
```tf
|
||||||
module "amazon-q" {
|
module "amazon-q" {
|
||||||
source = "registry.coder.com/coder/amazon-q/coder"
|
source = "registry.coder.com/coder/amazon-q/coder"
|
||||||
version = "1.0.1"
|
version = "1.1.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
experiment_auth_tarball = var.amazon_q_auth_tarball
|
experiment_auth_tarball = var.amazon_q_auth_tarball
|
||||||
experiment_pre_install_script = "echo Pre-install!"
|
experiment_pre_install_script = "echo Pre-install!"
|
||||||
|
|||||||
@ -4,7 +4,7 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
coder = {
|
coder = {
|
||||||
source = "coder/coder"
|
source = "coder/coder"
|
||||||
version = ">= 0.17"
|
version = ">= 2.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -24,6 +24,12 @@ variable "order" {
|
|||||||
default = null
|
default = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "group" {
|
||||||
|
type = string
|
||||||
|
description = "The name of a group that this app belongs to."
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
variable "icon" {
|
variable "icon" {
|
||||||
type = string
|
type = string
|
||||||
description = "The icon to use for the app."
|
description = "The icon to use for the app."
|
||||||
@ -213,7 +219,7 @@ resource "coder_script" "amazon_q" {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${var.experiment_report_tasks}" = "true" ]; then
|
if [ "${var.experiment_report_tasks}" = "true" ]; then
|
||||||
echo "Configuring Amazon Q to report tasks via Coder MCP..."
|
echo "Configuring Amazon Q to report tasks via Coder MCP..."
|
||||||
mkdir -p ~/.aws/amazonq
|
mkdir -p ~/.aws/amazonq
|
||||||
echo "${local.encoded_mcp_json}" | base64 -d > ~/.aws/amazonq/mcp.json
|
echo "${local.encoded_mcp_json}" | base64 -d > ~/.aws/amazonq/mcp.json
|
||||||
echo "Created the ~/.aws/amazonq/mcp.json configuration file"
|
echo "Created the ~/.aws/amazonq/mcp.json configuration file"
|
||||||
@ -227,19 +233,19 @@ resource "coder_script" "amazon_q" {
|
|||||||
|
|
||||||
if [ "${var.experiment_use_tmux}" = "true" ]; then
|
if [ "${var.experiment_use_tmux}" = "true" ]; then
|
||||||
echo "Running Amazon Q in the background with tmux..."
|
echo "Running Amazon Q in the background with tmux..."
|
||||||
|
|
||||||
if ! command_exists tmux; then
|
if ! command_exists tmux; then
|
||||||
echo "Error: tmux is not installed. Please install tmux manually."
|
echo "Error: tmux is not installed. Please install tmux manually."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
touch "$HOME/.amazon-q.log"
|
touch "$HOME/.amazon-q.log"
|
||||||
|
|
||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
export LC_ALL=en_US.UTF-8
|
export LC_ALL=en_US.UTF-8
|
||||||
|
|
||||||
tmux new-session -d -s amazon-q -c "${var.folder}" "q chat --trust-all-tools | tee -a "$HOME/.amazon-q.log" && exec bash"
|
tmux new-session -d -s amazon-q -c "${var.folder}" "q chat --trust-all-tools | tee -a "$HOME/.amazon-q.log" && exec bash"
|
||||||
|
|
||||||
tmux send-keys -t amazon-q "${local.full_prompt}"
|
tmux send-keys -t amazon-q "${local.full_prompt}"
|
||||||
sleep 5
|
sleep 5
|
||||||
tmux send-keys -t amazon-q Enter
|
tmux send-keys -t amazon-q Enter
|
||||||
@ -247,7 +253,7 @@ resource "coder_script" "amazon_q" {
|
|||||||
|
|
||||||
if [ "${var.experiment_use_screen}" = "true" ]; then
|
if [ "${var.experiment_use_screen}" = "true" ]; then
|
||||||
echo "Running Amazon Q in the background..."
|
echo "Running Amazon Q in the background..."
|
||||||
|
|
||||||
if ! command_exists screen; then
|
if ! command_exists screen; then
|
||||||
echo "Error: screen is not installed. Please install screen manually."
|
echo "Error: screen is not installed. Please install screen manually."
|
||||||
exit 1
|
exit 1
|
||||||
@ -259,7 +265,7 @@ resource "coder_script" "amazon_q" {
|
|||||||
echo "Creating ~/.screenrc and adding multiuser settings..." | tee -a "$HOME/.amazon-q.log"
|
echo "Creating ~/.screenrc and adding multiuser settings..." | tee -a "$HOME/.amazon-q.log"
|
||||||
echo -e "multiuser on\nacladd $(whoami)" > "$HOME/.screenrc"
|
echo -e "multiuser on\nacladd $(whoami)" > "$HOME/.screenrc"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! grep -q "^multiuser on$" "$HOME/.screenrc"; then
|
if ! grep -q "^multiuser on$" "$HOME/.screenrc"; then
|
||||||
echo "Adding 'multiuser on' to ~/.screenrc..." | tee -a "$HOME/.amazon-q.log"
|
echo "Adding 'multiuser on' to ~/.screenrc..." | tee -a "$HOME/.amazon-q.log"
|
||||||
echo "multiuser on" >> "$HOME/.screenrc"
|
echo "multiuser on" >> "$HOME/.screenrc"
|
||||||
@ -271,7 +277,7 @@ resource "coder_script" "amazon_q" {
|
|||||||
fi
|
fi
|
||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
export LC_ALL=en_US.UTF-8
|
export LC_ALL=en_US.UTF-8
|
||||||
|
|
||||||
screen -U -dmS amazon-q bash -c '
|
screen -U -dmS amazon-q bash -c '
|
||||||
cd ${var.folder}
|
cd ${var.folder}
|
||||||
q chat --trust-all-tools | tee -a "$HOME/.amazon-q.log
|
q chat --trust-all-tools | tee -a "$HOME/.amazon-q.log
|
||||||
@ -326,4 +332,6 @@ resource "coder_app" "amazon_q" {
|
|||||||
fi
|
fi
|
||||||
EOT
|
EOT
|
||||||
icon = var.icon
|
icon = var.icon
|
||||||
|
order = var.order
|
||||||
|
group = var.group
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,7 +14,7 @@ Run the [Claude Code](https://docs.anthropic.com/en/docs/agents-and-tools/claude
|
|||||||
```tf
|
```tf
|
||||||
module "claude-code" {
|
module "claude-code" {
|
||||||
source = "registry.coder.com/coder/claude-code/coder"
|
source = "registry.coder.com/coder/claude-code/coder"
|
||||||
version = "1.2.1"
|
version = "1.3.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
folder = "/home/coder"
|
folder = "/home/coder"
|
||||||
install_claude_code = true
|
install_claude_code = true
|
||||||
@ -107,7 +107,7 @@ Run Claude Code as a standalone app in your workspace. This will install Claude
|
|||||||
```tf
|
```tf
|
||||||
module "claude-code" {
|
module "claude-code" {
|
||||||
source = "registry.coder.com/coder/claude-code/coder"
|
source = "registry.coder.com/coder/claude-code/coder"
|
||||||
version = "1.2.1"
|
version = "1.3.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
folder = "/home/coder"
|
folder = "/home/coder"
|
||||||
install_claude_code = true
|
install_claude_code = true
|
||||||
|
|||||||
@ -4,7 +4,7 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
coder = {
|
coder = {
|
||||||
source = "coder/coder"
|
source = "coder/coder"
|
||||||
version = ">= 0.17"
|
version = ">= 2.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -24,6 +24,12 @@ variable "order" {
|
|||||||
default = null
|
default = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "group" {
|
||||||
|
type = string
|
||||||
|
description = "The name of a group that this app belongs to."
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
variable "icon" {
|
variable "icon" {
|
||||||
type = string
|
type = string
|
||||||
description = "The icon to use for the app."
|
description = "The icon to use for the app."
|
||||||
@ -148,7 +154,7 @@ resource "coder_script" "claude_code" {
|
|||||||
# Run with tmux if enabled
|
# Run with tmux if enabled
|
||||||
if [ "${var.experiment_use_tmux}" = "true" ]; then
|
if [ "${var.experiment_use_tmux}" = "true" ]; then
|
||||||
echo "Running Claude Code in the background with tmux..."
|
echo "Running Claude Code in the background with tmux..."
|
||||||
|
|
||||||
# Check if tmux is installed
|
# Check if tmux is installed
|
||||||
if ! command_exists tmux; then
|
if ! command_exists tmux; then
|
||||||
echo "Error: tmux is not installed. Please install tmux manually."
|
echo "Error: tmux is not installed. Please install tmux manually."
|
||||||
@ -156,13 +162,13 @@ resource "coder_script" "claude_code" {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
touch "$HOME/.claude-code.log"
|
touch "$HOME/.claude-code.log"
|
||||||
|
|
||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
export LC_ALL=en_US.UTF-8
|
export LC_ALL=en_US.UTF-8
|
||||||
|
|
||||||
# Create a new tmux session in detached mode
|
# Create a new tmux session in detached mode
|
||||||
tmux new-session -d -s claude-code -c ${var.folder} "claude --dangerously-skip-permissions"
|
tmux new-session -d -s claude-code -c ${var.folder} "claude --dangerously-skip-permissions"
|
||||||
|
|
||||||
# Send the prompt to the tmux session if needed
|
# Send the prompt to the tmux session if needed
|
||||||
if [ -n "$CODER_MCP_CLAUDE_TASK_PROMPT" ]; then
|
if [ -n "$CODER_MCP_CLAUDE_TASK_PROMPT" ]; then
|
||||||
tmux send-keys -t claude-code "$CODER_MCP_CLAUDE_TASK_PROMPT"
|
tmux send-keys -t claude-code "$CODER_MCP_CLAUDE_TASK_PROMPT"
|
||||||
@ -174,7 +180,7 @@ resource "coder_script" "claude_code" {
|
|||||||
# Run with screen if enabled
|
# Run with screen if enabled
|
||||||
if [ "${var.experiment_use_screen}" = "true" ]; then
|
if [ "${var.experiment_use_screen}" = "true" ]; then
|
||||||
echo "Running Claude Code in the background..."
|
echo "Running Claude Code in the background..."
|
||||||
|
|
||||||
# Check if screen is installed
|
# Check if screen is installed
|
||||||
if ! command_exists screen; then
|
if ! command_exists screen; then
|
||||||
echo "Error: screen is not installed. Please install screen manually."
|
echo "Error: screen is not installed. Please install screen manually."
|
||||||
@ -188,7 +194,7 @@ resource "coder_script" "claude_code" {
|
|||||||
echo "Creating ~/.screenrc and adding multiuser settings..." | tee -a "$HOME/.claude-code.log"
|
echo "Creating ~/.screenrc and adding multiuser settings..." | tee -a "$HOME/.claude-code.log"
|
||||||
echo -e "multiuser on\nacladd $(whoami)" > "$HOME/.screenrc"
|
echo -e "multiuser on\nacladd $(whoami)" > "$HOME/.screenrc"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! grep -q "^multiuser on$" "$HOME/.screenrc"; then
|
if ! grep -q "^multiuser on$" "$HOME/.screenrc"; then
|
||||||
echo "Adding 'multiuser on' to ~/.screenrc..." | tee -a "$HOME/.claude-code.log"
|
echo "Adding 'multiuser on' to ~/.screenrc..." | tee -a "$HOME/.claude-code.log"
|
||||||
echo "multiuser on" >> "$HOME/.screenrc"
|
echo "multiuser on" >> "$HOME/.screenrc"
|
||||||
@ -200,7 +206,7 @@ resource "coder_script" "claude_code" {
|
|||||||
fi
|
fi
|
||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
export LC_ALL=en_US.UTF-8
|
export LC_ALL=en_US.UTF-8
|
||||||
|
|
||||||
screen -U -dmS claude-code bash -c '
|
screen -U -dmS claude-code bash -c '
|
||||||
cd ${var.folder}
|
cd ${var.folder}
|
||||||
claude --dangerously-skip-permissions | tee -a "$HOME/.claude-code.log"
|
claude --dangerously-skip-permissions | tee -a "$HOME/.claude-code.log"
|
||||||
@ -256,4 +262,6 @@ resource "coder_app" "claude_code" {
|
|||||||
fi
|
fi
|
||||||
EOT
|
EOT
|
||||||
icon = var.icon
|
icon = var.icon
|
||||||
|
order = var.order
|
||||||
|
group = var.group
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,7 +15,7 @@ Automatically install [code-server](https://github.com/coder/code-server) in a w
|
|||||||
module "code-server" {
|
module "code-server" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/code-server/coder"
|
source = "registry.coder.com/coder/code-server/coder"
|
||||||
version = "1.2.0"
|
version = "1.3.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -30,7 +30,7 @@ module "code-server" {
|
|||||||
module "code-server" {
|
module "code-server" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/code-server/coder"
|
source = "registry.coder.com/coder/code-server/coder"
|
||||||
version = "1.2.0"
|
version = "1.3.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
install_version = "4.8.3"
|
install_version = "4.8.3"
|
||||||
}
|
}
|
||||||
@ -44,7 +44,7 @@ Install the Dracula theme from [OpenVSX](https://open-vsx.org/):
|
|||||||
module "code-server" {
|
module "code-server" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/code-server/coder"
|
source = "registry.coder.com/coder/code-server/coder"
|
||||||
version = "1.2.0"
|
version = "1.3.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
extensions = [
|
extensions = [
|
||||||
"dracula-theme.theme-dracula"
|
"dracula-theme.theme-dracula"
|
||||||
@ -62,7 +62,7 @@ Configure VS Code's [settings.json](https://code.visualstudio.com/docs/getstarte
|
|||||||
module "code-server" {
|
module "code-server" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/code-server/coder"
|
source = "registry.coder.com/coder/code-server/coder"
|
||||||
version = "1.2.0"
|
version = "1.3.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
extensions = ["dracula-theme.theme-dracula"]
|
extensions = ["dracula-theme.theme-dracula"]
|
||||||
settings = {
|
settings = {
|
||||||
@ -79,7 +79,7 @@ Just run code-server in the background, don't fetch it from GitHub:
|
|||||||
module "code-server" {
|
module "code-server" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/code-server/coder"
|
source = "registry.coder.com/coder/code-server/coder"
|
||||||
version = "1.2.0"
|
version = "1.3.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
extensions = ["dracula-theme.theme-dracula", "ms-azuretools.vscode-docker"]
|
extensions = ["dracula-theme.theme-dracula", "ms-azuretools.vscode-docker"]
|
||||||
}
|
}
|
||||||
@ -95,7 +95,7 @@ Run an existing copy of code-server if found, otherwise download from GitHub:
|
|||||||
module "code-server" {
|
module "code-server" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/code-server/coder"
|
source = "registry.coder.com/coder/code-server/coder"
|
||||||
version = "1.2.0"
|
version = "1.3.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
use_cached = true
|
use_cached = true
|
||||||
extensions = ["dracula-theme.theme-dracula", "ms-azuretools.vscode-docker"]
|
extensions = ["dracula-theme.theme-dracula", "ms-azuretools.vscode-docker"]
|
||||||
@ -108,7 +108,7 @@ Just run code-server in the background, don't fetch it from GitHub:
|
|||||||
module "code-server" {
|
module "code-server" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/code-server/coder"
|
source = "registry.coder.com/coder/code-server/coder"
|
||||||
version = "1.2.0"
|
version = "1.3.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
offline = true
|
offline = true
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,7 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
coder = {
|
coder = {
|
||||||
source = "coder/coder"
|
source = "coder/coder"
|
||||||
version = ">= 2.1"
|
version = ">= 2.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -89,6 +89,12 @@ variable "order" {
|
|||||||
default = null
|
default = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "group" {
|
||||||
|
type = string
|
||||||
|
description = "The name of a group that this app belongs to."
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
variable "offline" {
|
variable "offline" {
|
||||||
type = bool
|
type = bool
|
||||||
description = "Just run code-server in the background, don't fetch it from GitHub"
|
description = "Just run code-server in the background, don't fetch it from GitHub"
|
||||||
@ -187,6 +193,7 @@ resource "coder_app" "code-server" {
|
|||||||
subdomain = var.subdomain
|
subdomain = var.subdomain
|
||||||
share = var.share
|
share = var.share
|
||||||
order = var.order
|
order = var.order
|
||||||
|
group = var.group
|
||||||
open_in = var.open_in
|
open_in = var.open_in
|
||||||
|
|
||||||
healthcheck {
|
healthcheck {
|
||||||
|
|||||||
@ -17,7 +17,7 @@ Uses the [Coder Remote VS Code Extension](https://github.com/coder/vscode-coder)
|
|||||||
module "cursor" {
|
module "cursor" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/cursor/coder"
|
source = "registry.coder.com/coder/cursor/coder"
|
||||||
version = "1.1.0"
|
version = "1.2.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -30,7 +30,7 @@ module "cursor" {
|
|||||||
module "cursor" {
|
module "cursor" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/cursor/coder"
|
source = "registry.coder.com/coder/cursor/coder"
|
||||||
version = "1.1.0"
|
version = "1.2.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
folder = "/home/coder/project"
|
folder = "/home/coder/project"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,7 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
coder = {
|
coder = {
|
||||||
source = "coder/coder"
|
source = "coder/coder"
|
||||||
version = ">= 0.23"
|
version = ">= 2.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -32,6 +32,12 @@ variable "order" {
|
|||||||
default = null
|
default = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "group" {
|
||||||
|
type = string
|
||||||
|
description = "The name of a group that this app belongs to."
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
variable "slug" {
|
variable "slug" {
|
||||||
type = string
|
type = string
|
||||||
description = "The slug of the app."
|
description = "The slug of the app."
|
||||||
@ -54,6 +60,7 @@ resource "coder_app" "cursor" {
|
|||||||
slug = var.slug
|
slug = var.slug
|
||||||
display_name = var.display_name
|
display_name = var.display_name
|
||||||
order = var.order
|
order = var.order
|
||||||
|
group = var.group
|
||||||
url = join("", [
|
url = join("", [
|
||||||
"cursor://coder.coder-remote/open",
|
"cursor://coder.coder-remote/open",
|
||||||
"?owner=",
|
"?owner=",
|
||||||
|
|||||||
@ -19,7 +19,7 @@ Under the hood, this module uses the [coder dotfiles](https://coder.com/docs/v2/
|
|||||||
module "dotfiles" {
|
module "dotfiles" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/dotfiles/coder"
|
source = "registry.coder.com/coder/dotfiles/coder"
|
||||||
version = "1.0.29"
|
version = "1.1.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -32,7 +32,7 @@ module "dotfiles" {
|
|||||||
module "dotfiles" {
|
module "dotfiles" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/dotfiles/coder"
|
source = "registry.coder.com/coder/dotfiles/coder"
|
||||||
version = "1.0.29"
|
version = "1.1.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -43,7 +43,7 @@ module "dotfiles" {
|
|||||||
module "dotfiles" {
|
module "dotfiles" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/dotfiles/coder"
|
source = "registry.coder.com/coder/dotfiles/coder"
|
||||||
version = "1.0.29"
|
version = "1.1.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
user = "root"
|
user = "root"
|
||||||
}
|
}
|
||||||
@ -55,14 +55,14 @@ module "dotfiles" {
|
|||||||
module "dotfiles" {
|
module "dotfiles" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/dotfiles/coder"
|
source = "registry.coder.com/coder/dotfiles/coder"
|
||||||
version = "1.0.29"
|
version = "1.1.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
}
|
}
|
||||||
|
|
||||||
module "dotfiles-root" {
|
module "dotfiles-root" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/dotfiles/coder"
|
source = "registry.coder.com/coder/dotfiles/coder"
|
||||||
version = "1.0.29"
|
version = "1.1.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
user = "root"
|
user = "root"
|
||||||
dotfiles_uri = module.dotfiles.dotfiles_uri
|
dotfiles_uri = module.dotfiles.dotfiles_uri
|
||||||
@ -77,7 +77,7 @@ You can set a default dotfiles repository for all users by setting the `default_
|
|||||||
module "dotfiles" {
|
module "dotfiles" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/dotfiles/coder"
|
source = "registry.coder.com/coder/dotfiles/coder"
|
||||||
version = "1.0.29"
|
version = "1.1.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
default_dotfiles_uri = "https://github.com/coder/dotfiles"
|
default_dotfiles_uri = "https://github.com/coder/dotfiles"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,11 +4,23 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
coder = {
|
coder = {
|
||||||
source = "coder/coder"
|
source = "coder/coder"
|
||||||
version = ">= 0.12"
|
version = ">= 2.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "order" {
|
||||||
|
type = number
|
||||||
|
description = "The order determines the position of app in the UI presentation. The lowest order is shown first and apps with equal order are sorted by name (ascending order)."
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "group" {
|
||||||
|
type = string
|
||||||
|
description = "The name of a group that this app belongs to."
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
variable "agent_id" {
|
variable "agent_id" {
|
||||||
type = string
|
type = string
|
||||||
description = "The ID of a Coder agent."
|
description = "The ID of a Coder agent."
|
||||||
@ -79,6 +91,8 @@ resource "coder_app" "dotfiles" {
|
|||||||
display_name = "Refresh Dotfiles"
|
display_name = "Refresh Dotfiles"
|
||||||
slug = "dotfiles"
|
slug = "dotfiles"
|
||||||
icon = "/icon/dotfiles.svg"
|
icon = "/icon/dotfiles.svg"
|
||||||
|
order = var.order
|
||||||
|
group = var.group
|
||||||
command = templatefile("${path.module}/run.sh", {
|
command = templatefile("${path.module}/run.sh", {
|
||||||
DOTFILES_URI : local.dotfiles_uri,
|
DOTFILES_URI : local.dotfiles_uri,
|
||||||
DOTFILES_USER : local.user
|
DOTFILES_USER : local.user
|
||||||
|
|||||||
@ -15,7 +15,7 @@ A file browser for your workspace.
|
|||||||
module "filebrowser" {
|
module "filebrowser" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/filebrowser/coder"
|
source = "registry.coder.com/coder/filebrowser/coder"
|
||||||
version = "1.0.31"
|
version = "1.1.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -30,7 +30,7 @@ module "filebrowser" {
|
|||||||
module "filebrowser" {
|
module "filebrowser" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/filebrowser/coder"
|
source = "registry.coder.com/coder/filebrowser/coder"
|
||||||
version = "1.0.31"
|
version = "1.1.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
folder = "/home/coder/project"
|
folder = "/home/coder/project"
|
||||||
}
|
}
|
||||||
@ -42,7 +42,7 @@ module "filebrowser" {
|
|||||||
module "filebrowser" {
|
module "filebrowser" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/filebrowser/coder"
|
source = "registry.coder.com/coder/filebrowser/coder"
|
||||||
version = "1.0.31"
|
version = "1.1.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
database_path = ".config/filebrowser.db"
|
database_path = ".config/filebrowser.db"
|
||||||
}
|
}
|
||||||
@ -54,7 +54,7 @@ module "filebrowser" {
|
|||||||
module "filebrowser" {
|
module "filebrowser" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/filebrowser/coder"
|
source = "registry.coder.com/coder/filebrowser/coder"
|
||||||
version = "1.0.31"
|
version = "1.1.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
agent_name = "main"
|
agent_name = "main"
|
||||||
subdomain = false
|
subdomain = false
|
||||||
|
|||||||
@ -4,7 +4,7 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
coder = {
|
coder = {
|
||||||
source = "coder/coder"
|
source = "coder/coder"
|
||||||
version = ">= 0.17"
|
version = ">= 2.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -68,6 +68,12 @@ variable "order" {
|
|||||||
default = null
|
default = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "group" {
|
||||||
|
type = string
|
||||||
|
description = "The name of a group that this app belongs to."
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
variable "slug" {
|
variable "slug" {
|
||||||
type = string
|
type = string
|
||||||
description = "The slug of the coder_app resource."
|
description = "The slug of the coder_app resource."
|
||||||
@ -108,6 +114,7 @@ resource "coder_app" "filebrowser" {
|
|||||||
subdomain = var.subdomain
|
subdomain = var.subdomain
|
||||||
share = var.share
|
share = var.share
|
||||||
order = var.order
|
order = var.order
|
||||||
|
group = var.group
|
||||||
|
|
||||||
healthcheck {
|
healthcheck {
|
||||||
url = local.healthcheck_url
|
url = local.healthcheck_url
|
||||||
@ -120,4 +127,4 @@ locals {
|
|||||||
server_base_path = var.subdomain ? "" : format("/@%s/%s%s/apps/%s", data.coder_workspace_owner.me.name, data.coder_workspace.me.name, var.agent_name != null ? ".${var.agent_name}" : "", var.slug)
|
server_base_path = var.subdomain ? "" : format("/@%s/%s%s/apps/%s", data.coder_workspace_owner.me.name, data.coder_workspace.me.name, var.agent_name != null ? ".${var.agent_name}" : "", var.slug)
|
||||||
url = "http://localhost:${var.port}${local.server_base_path}"
|
url = "http://localhost:${var.port}${local.server_base_path}"
|
||||||
healthcheck_url = "http://localhost:${var.port}${local.server_base_path}/health"
|
healthcheck_url = "http://localhost:${var.port}${local.server_base_path}/health"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,7 +14,7 @@ Run the [Goose](https://block.github.io/goose/) agent in your workspace to gener
|
|||||||
```tf
|
```tf
|
||||||
module "goose" {
|
module "goose" {
|
||||||
source = "registry.coder.com/coder/goose/coder"
|
source = "registry.coder.com/coder/goose/coder"
|
||||||
version = "1.2.0"
|
version = "1.3.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
folder = "/home/coder"
|
folder = "/home/coder"
|
||||||
install_goose = true
|
install_goose = true
|
||||||
@ -90,7 +90,7 @@ resource "coder_agent" "main" {
|
|||||||
module "goose" {
|
module "goose" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/goose/coder"
|
source = "registry.coder.com/coder/goose/coder"
|
||||||
version = "1.2.0"
|
version = "1.3.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
folder = "/home/coder"
|
folder = "/home/coder"
|
||||||
install_goose = true
|
install_goose = true
|
||||||
@ -152,7 +152,7 @@ Run Goose as a standalone app in your workspace. This will install Goose and run
|
|||||||
```tf
|
```tf
|
||||||
module "goose" {
|
module "goose" {
|
||||||
source = "registry.coder.com/coder/goose/coder"
|
source = "registry.coder.com/coder/goose/coder"
|
||||||
version = "1.2.0"
|
version = "1.3.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
folder = "/home/coder"
|
folder = "/home/coder"
|
||||||
install_goose = true
|
install_goose = true
|
||||||
|
|||||||
@ -4,7 +4,7 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
coder = {
|
coder = {
|
||||||
source = "coder/coder"
|
source = "coder/coder"
|
||||||
version = ">= 0.17"
|
version = ">= 2.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -24,6 +24,12 @@ variable "order" {
|
|||||||
default = null
|
default = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "group" {
|
||||||
|
type = string
|
||||||
|
description = "The name of a group that this app belongs to."
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
variable "icon" {
|
variable "icon" {
|
||||||
type = string
|
type = string
|
||||||
description = "The icon to use for the app."
|
description = "The icon to use for the app."
|
||||||
@ -194,11 +200,11 @@ GOOSE_MODEL: ${var.experiment_goose_model}
|
|||||||
${trimspace(local.combined_extensions)}
|
${trimspace(local.combined_extensions)}
|
||||||
EOL
|
EOL
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Write system prompt to config
|
# Write system prompt to config
|
||||||
mkdir -p "$HOME/.config/goose"
|
mkdir -p "$HOME/.config/goose"
|
||||||
echo "$GOOSE_SYSTEM_PROMPT" > "$HOME/.config/goose/.goosehints"
|
echo "$GOOSE_SYSTEM_PROMPT" > "$HOME/.config/goose/.goosehints"
|
||||||
|
|
||||||
# Handle terminal multiplexer selection (tmux or screen)
|
# Handle terminal multiplexer selection (tmux or screen)
|
||||||
if [ "${var.experiment_use_tmux}" = "true" ] && [ "${var.experiment_use_screen}" = "true" ]; then
|
if [ "${var.experiment_use_tmux}" = "true" ] && [ "${var.experiment_use_screen}" = "true" ]; then
|
||||||
echo "Error: Both experiment_use_tmux and experiment_use_screen cannot be true simultaneously."
|
echo "Error: Both experiment_use_tmux and experiment_use_screen cannot be true simultaneously."
|
||||||
@ -219,7 +225,7 @@ EOL
|
|||||||
# Run with tmux if enabled
|
# Run with tmux if enabled
|
||||||
if [ "${var.experiment_use_tmux}" = "true" ]; then
|
if [ "${var.experiment_use_tmux}" = "true" ]; then
|
||||||
echo "Running Goose in the background with tmux..."
|
echo "Running Goose in the background with tmux..."
|
||||||
|
|
||||||
# Check if tmux is installed
|
# Check if tmux is installed
|
||||||
if ! command_exists tmux; then
|
if ! command_exists tmux; then
|
||||||
echo "Error: tmux is not installed. Please install tmux manually."
|
echo "Error: tmux is not installed. Please install tmux manually."
|
||||||
@ -227,26 +233,26 @@ EOL
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
touch "$HOME/.goose.log"
|
touch "$HOME/.goose.log"
|
||||||
|
|
||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
export LC_ALL=en_US.UTF-8
|
export LC_ALL=en_US.UTF-8
|
||||||
|
|
||||||
# Configure tmux for shared sessions
|
# Configure tmux for shared sessions
|
||||||
if [ ! -f "$HOME/.tmux.conf" ]; then
|
if [ ! -f "$HOME/.tmux.conf" ]; then
|
||||||
echo "Creating ~/.tmux.conf with shared session settings..."
|
echo "Creating ~/.tmux.conf with shared session settings..."
|
||||||
echo "set -g mouse on" > "$HOME/.tmux.conf"
|
echo "set -g mouse on" > "$HOME/.tmux.conf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! grep -q "^set -g mouse on$" "$HOME/.tmux.conf"; then
|
if ! grep -q "^set -g mouse on$" "$HOME/.tmux.conf"; then
|
||||||
echo "Adding 'set -g mouse on' to ~/.tmux.conf..."
|
echo "Adding 'set -g mouse on' to ~/.tmux.conf..."
|
||||||
echo "set -g mouse on" >> "$HOME/.tmux.conf"
|
echo "set -g mouse on" >> "$HOME/.tmux.conf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create a new tmux session in detached mode
|
# Create a new tmux session in detached mode
|
||||||
tmux new-session -d -s ${var.session_name} -c ${var.folder} "\"$GOOSE_CMD\" run --text \"Review your goosehints. Every step of the way, report tasks to Coder with proper descriptions and statuses. Your task at hand: $GOOSE_TASK_PROMPT\" --interactive | tee -a \"$HOME/.goose.log\"; exec bash"
|
tmux new-session -d -s ${var.session_name} -c ${var.folder} "\"$GOOSE_CMD\" run --text \"Review your goosehints. Every step of the way, report tasks to Coder with proper descriptions and statuses. Your task at hand: $GOOSE_TASK_PROMPT\" --interactive | tee -a \"$HOME/.goose.log\"; exec bash"
|
||||||
elif [ "${var.experiment_use_screen}" = "true" ]; then
|
elif [ "${var.experiment_use_screen}" = "true" ]; then
|
||||||
echo "Running Goose in the background..."
|
echo "Running Goose in the background..."
|
||||||
|
|
||||||
# Check if screen is installed
|
# Check if screen is installed
|
||||||
if ! command_exists screen; then
|
if ! command_exists screen; then
|
||||||
echo "Error: screen is not installed. Please install screen manually."
|
echo "Error: screen is not installed. Please install screen manually."
|
||||||
@ -260,7 +266,7 @@ EOL
|
|||||||
echo "Creating ~/.screenrc and adding multiuser settings..." | tee -a "$HOME/.goose.log"
|
echo "Creating ~/.screenrc and adding multiuser settings..." | tee -a "$HOME/.goose.log"
|
||||||
echo -e "multiuser on\nacladd $(whoami)" > "$HOME/.screenrc"
|
echo -e "multiuser on\nacladd $(whoami)" > "$HOME/.screenrc"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! grep -q "^multiuser on$" "$HOME/.screenrc"; then
|
if ! grep -q "^multiuser on$" "$HOME/.screenrc"; then
|
||||||
echo "Adding 'multiuser on' to ~/.screenrc..." | tee -a "$HOME/.goose.log"
|
echo "Adding 'multiuser on' to ~/.screenrc..." | tee -a "$HOME/.goose.log"
|
||||||
echo "multiuser on" >> "$HOME/.screenrc"
|
echo "multiuser on" >> "$HOME/.screenrc"
|
||||||
@ -272,7 +278,7 @@ EOL
|
|||||||
fi
|
fi
|
||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
export LC_ALL=en_US.UTF-8
|
export LC_ALL=en_US.UTF-8
|
||||||
|
|
||||||
screen -U -dmS ${var.session_name} bash -c "
|
screen -U -dmS ${var.session_name} bash -c "
|
||||||
cd ${var.folder}
|
cd ${var.folder}
|
||||||
\"$GOOSE_CMD\" run --text \"Review your goosehints. Every step of the way, report tasks to Coder with proper descriptions and statuses. Your task at hand: $GOOSE_TASK_PROMPT\" --interactive | tee -a \"$HOME/.goose.log\"
|
\"$GOOSE_CMD\" run --text \"Review your goosehints. Every step of the way, report tasks to Coder with proper descriptions and statuses. Your task at hand: $GOOSE_TASK_PROMPT\" --interactive | tee -a \"$HOME/.goose.log\"
|
||||||
@ -331,4 +337,6 @@ resource "coder_app" "goose" {
|
|||||||
fi
|
fi
|
||||||
EOT
|
EOT
|
||||||
icon = var.icon
|
icon = var.icon
|
||||||
|
order = var.order
|
||||||
|
group = var.group
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,7 +18,7 @@ Consult the [JetBrains documentation](https://www.jetbrains.com/help/idea/prereq
|
|||||||
module "jetbrains_gateway" {
|
module "jetbrains_gateway" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/jetbrains-gateway/coder"
|
source = "registry.coder.com/coder/jetbrains-gateway/coder"
|
||||||
version = "1.1.1"
|
version = "1.2.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
folder = "/home/coder/example"
|
folder = "/home/coder/example"
|
||||||
jetbrains_ides = ["CL", "GO", "IU", "PY", "WS"]
|
jetbrains_ides = ["CL", "GO", "IU", "PY", "WS"]
|
||||||
@ -36,7 +36,7 @@ module "jetbrains_gateway" {
|
|||||||
module "jetbrains_gateway" {
|
module "jetbrains_gateway" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/jetbrains-gateway/coder"
|
source = "registry.coder.com/coder/jetbrains-gateway/coder"
|
||||||
version = "1.1.1"
|
version = "1.2.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
folder = "/home/coder/example"
|
folder = "/home/coder/example"
|
||||||
jetbrains_ides = ["GO", "WS"]
|
jetbrains_ides = ["GO", "WS"]
|
||||||
@ -50,7 +50,7 @@ module "jetbrains_gateway" {
|
|||||||
module "jetbrains_gateway" {
|
module "jetbrains_gateway" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/jetbrains-gateway/coder"
|
source = "registry.coder.com/coder/jetbrains-gateway/coder"
|
||||||
version = "1.1.1"
|
version = "1.2.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
folder = "/home/coder/example"
|
folder = "/home/coder/example"
|
||||||
jetbrains_ides = ["IU", "PY"]
|
jetbrains_ides = ["IU", "PY"]
|
||||||
@ -65,7 +65,7 @@ module "jetbrains_gateway" {
|
|||||||
module "jetbrains_gateway" {
|
module "jetbrains_gateway" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/jetbrains-gateway/coder"
|
source = "registry.coder.com/coder/jetbrains-gateway/coder"
|
||||||
version = "1.1.1"
|
version = "1.2.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
folder = "/home/coder/example"
|
folder = "/home/coder/example"
|
||||||
jetbrains_ides = ["IU", "PY"]
|
jetbrains_ides = ["IU", "PY"]
|
||||||
@ -90,7 +90,7 @@ module "jetbrains_gateway" {
|
|||||||
module "jetbrains_gateway" {
|
module "jetbrains_gateway" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/jetbrains-gateway/coder"
|
source = "registry.coder.com/coder/jetbrains-gateway/coder"
|
||||||
version = "1.1.1"
|
version = "1.2.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
folder = "/home/coder/example"
|
folder = "/home/coder/example"
|
||||||
jetbrains_ides = ["GO", "WS"]
|
jetbrains_ides = ["GO", "WS"]
|
||||||
@ -108,7 +108,7 @@ Due to the highest priority of the `ide_download_link` parameter in the `(jetbra
|
|||||||
module "jetbrains_gateway" {
|
module "jetbrains_gateway" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/jetbrains-gateway/coder"
|
source = "registry.coder.com/coder/jetbrains-gateway/coder"
|
||||||
version = "1.1.1"
|
version = "1.2.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
folder = "/home/coder/example"
|
folder = "/home/coder/example"
|
||||||
jetbrains_ides = ["GO", "WS"]
|
jetbrains_ides = ["GO", "WS"]
|
||||||
|
|||||||
@ -4,7 +4,7 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
coder = {
|
coder = {
|
||||||
source = "coder/coder"
|
source = "coder/coder"
|
||||||
version = ">= 0.17"
|
version = ">= 2.5"
|
||||||
}
|
}
|
||||||
http = {
|
http = {
|
||||||
source = "hashicorp/http"
|
source = "hashicorp/http"
|
||||||
@ -62,6 +62,12 @@ variable "order" {
|
|||||||
default = null
|
default = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "group" {
|
||||||
|
type = string
|
||||||
|
description = "The name of a group that this app belongs to."
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
variable "coder_parameter_order" {
|
variable "coder_parameter_order" {
|
||||||
type = number
|
type = number
|
||||||
description = "The order determines the position of a template parameter in the UI/CLI presentation. The lowest order is shown first and parameters with equal order are sorted by name (ascending order)."
|
description = "The order determines the position of a template parameter in the UI/CLI presentation. The lowest order is shown first and parameters with equal order are sorted by name (ascending order)."
|
||||||
@ -324,6 +330,7 @@ resource "coder_app" "gateway" {
|
|||||||
icon = local.icon
|
icon = local.icon
|
||||||
external = true
|
external = true
|
||||||
order = var.order
|
order = var.order
|
||||||
|
group = var.group
|
||||||
url = join("", [
|
url = join("", [
|
||||||
"jetbrains-gateway://connect#type=coder&workspace=",
|
"jetbrains-gateway://connect#type=coder&workspace=",
|
||||||
data.coder_workspace.me.name,
|
data.coder_workspace.me.name,
|
||||||
|
|||||||
@ -17,7 +17,7 @@ A module that adds Jupyter Notebook in your Coder template.
|
|||||||
module "jupyter-notebook" {
|
module "jupyter-notebook" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/jupyter-notebook/coder"
|
source = "registry.coder.com/coder/jupyter-notebook/coder"
|
||||||
version = "1.0.19"
|
version = "1.1.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@ -4,7 +4,7 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
coder = {
|
coder = {
|
||||||
source = "coder/coder"
|
source = "coder/coder"
|
||||||
version = ">= 0.17"
|
version = ">= 2.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -42,6 +42,12 @@ variable "order" {
|
|||||||
default = null
|
default = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "group" {
|
||||||
|
type = string
|
||||||
|
description = "The name of a group that this app belongs to."
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
resource "coder_script" "jupyter-notebook" {
|
resource "coder_script" "jupyter-notebook" {
|
||||||
agent_id = var.agent_id
|
agent_id = var.agent_id
|
||||||
display_name = "jupyter-notebook"
|
display_name = "jupyter-notebook"
|
||||||
@ -62,4 +68,5 @@ resource "coder_app" "jupyter-notebook" {
|
|||||||
subdomain = true
|
subdomain = true
|
||||||
share = var.share
|
share = var.share
|
||||||
order = var.order
|
order = var.order
|
||||||
|
group = var.group
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,7 +17,7 @@ A module that adds JupyterLab in your Coder template.
|
|||||||
module "jupyterlab" {
|
module "jupyterlab" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/jupyterlab/coder"
|
source = "registry.coder.com/coder/jupyterlab/coder"
|
||||||
version = "1.0.31"
|
version = "1.1.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@ -4,7 +4,7 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
coder = {
|
coder = {
|
||||||
source = "coder/coder"
|
source = "coder/coder"
|
||||||
version = ">= 0.17"
|
version = ">= 2.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -51,6 +51,12 @@ variable "order" {
|
|||||||
default = null
|
default = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "group" {
|
||||||
|
type = string
|
||||||
|
description = "The name of a group that this app belongs to."
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
resource "coder_script" "jupyterlab" {
|
resource "coder_script" "jupyterlab" {
|
||||||
agent_id = var.agent_id
|
agent_id = var.agent_id
|
||||||
display_name = "jupyterlab"
|
display_name = "jupyterlab"
|
||||||
@ -72,4 +78,5 @@ resource "coder_app" "jupyterlab" {
|
|||||||
subdomain = var.subdomain
|
subdomain = var.subdomain
|
||||||
share = var.share
|
share = var.share
|
||||||
order = var.order
|
order = var.order
|
||||||
|
group = var.group
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,7 +15,7 @@ Automatically install [KasmVNC](https://kasmweb.com/kasmvnc) in a workspace, and
|
|||||||
module "kasmvnc" {
|
module "kasmvnc" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/kasmvnc/coder"
|
source = "registry.coder.com/coder/kasmvnc/coder"
|
||||||
version = "1.1.0"
|
version = "1.2.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
desktop_environment = "xfce"
|
desktop_environment = "xfce"
|
||||||
subdomain = true
|
subdomain = true
|
||||||
|
|||||||
@ -4,7 +4,7 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
coder = {
|
coder = {
|
||||||
source = "coder/coder"
|
source = "coder/coder"
|
||||||
version = ">= 0.12"
|
version = ">= 2.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -36,6 +36,18 @@ variable "desktop_environment" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "order" {
|
||||||
|
type = number
|
||||||
|
description = "The order determines the position of app in the UI presentation. The lowest order is shown first and apps with equal order are sorted by name (ascending order)."
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "group" {
|
||||||
|
type = string
|
||||||
|
description = "The name of a group that this app belongs to."
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
variable "subdomain" {
|
variable "subdomain" {
|
||||||
type = bool
|
type = bool
|
||||||
default = true
|
default = true
|
||||||
@ -64,6 +76,8 @@ resource "coder_app" "kasm_vnc" {
|
|||||||
icon = "/icon/kasmvnc.svg"
|
icon = "/icon/kasmvnc.svg"
|
||||||
subdomain = var.subdomain
|
subdomain = var.subdomain
|
||||||
share = "owner"
|
share = "owner"
|
||||||
|
order = var.order
|
||||||
|
group = var.group
|
||||||
|
|
||||||
healthcheck {
|
healthcheck {
|
||||||
url = "http://localhost:${var.port}/app"
|
url = "http://localhost:${var.port}/app"
|
||||||
|
|||||||
@ -17,7 +17,7 @@ Uses the [Coder Remote VS Code Extension](https://github.com/coder/vscode-coder)
|
|||||||
module "vscode" {
|
module "vscode" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/vscode-desktop/coder"
|
source = "registry.coder.com/coder/vscode-desktop/coder"
|
||||||
version = "1.0.15"
|
version = "1.1.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -30,7 +30,7 @@ module "vscode" {
|
|||||||
module "vscode" {
|
module "vscode" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/vscode-desktop/coder"
|
source = "registry.coder.com/coder/vscode-desktop/coder"
|
||||||
version = "1.0.15"
|
version = "1.1.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
folder = "/home/coder/project"
|
folder = "/home/coder/project"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,7 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
coder = {
|
coder = {
|
||||||
source = "coder/coder"
|
source = "coder/coder"
|
||||||
version = ">= 0.23"
|
version = ">= 2.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -32,6 +32,12 @@ variable "order" {
|
|||||||
default = null
|
default = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "group" {
|
||||||
|
type = string
|
||||||
|
description = "The name of a group that this app belongs to."
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
data "coder_workspace" "me" {}
|
data "coder_workspace" "me" {}
|
||||||
data "coder_workspace_owner" "me" {}
|
data "coder_workspace_owner" "me" {}
|
||||||
|
|
||||||
@ -42,6 +48,8 @@ resource "coder_app" "vscode" {
|
|||||||
slug = "vscode"
|
slug = "vscode"
|
||||||
display_name = "VS Code Desktop"
|
display_name = "VS Code Desktop"
|
||||||
order = var.order
|
order = var.order
|
||||||
|
group = var.group
|
||||||
|
|
||||||
url = join("", [
|
url = join("", [
|
||||||
"vscode://coder.coder-remote/open",
|
"vscode://coder.coder-remote/open",
|
||||||
"?owner=",
|
"?owner=",
|
||||||
|
|||||||
@ -15,7 +15,7 @@ Automatically install [Visual Studio Code Server](https://code.visualstudio.com/
|
|||||||
module "vscode-web" {
|
module "vscode-web" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/vscode-web/coder"
|
source = "registry.coder.com/coder/vscode-web/coder"
|
||||||
version = "1.1.0"
|
version = "1.2.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
accept_license = true
|
accept_license = true
|
||||||
}
|
}
|
||||||
@ -31,7 +31,7 @@ module "vscode-web" {
|
|||||||
module "vscode-web" {
|
module "vscode-web" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/vscode-web/coder"
|
source = "registry.coder.com/coder/vscode-web/coder"
|
||||||
version = "1.1.0"
|
version = "1.2.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
install_prefix = "/home/coder/.vscode-web"
|
install_prefix = "/home/coder/.vscode-web"
|
||||||
folder = "/home/coder"
|
folder = "/home/coder"
|
||||||
@ -45,7 +45,7 @@ module "vscode-web" {
|
|||||||
module "vscode-web" {
|
module "vscode-web" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/vscode-web/coder"
|
source = "registry.coder.com/coder/vscode-web/coder"
|
||||||
version = "1.1.0"
|
version = "1.2.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
extensions = ["github.copilot", "ms-python.python", "ms-toolsai.jupyter"]
|
extensions = ["github.copilot", "ms-python.python", "ms-toolsai.jupyter"]
|
||||||
accept_license = true
|
accept_license = true
|
||||||
@ -60,7 +60,7 @@ Configure VS Code's [settings.json](https://code.visualstudio.com/docs/getstarte
|
|||||||
module "vscode-web" {
|
module "vscode-web" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/vscode-web/coder"
|
source = "registry.coder.com/coder/vscode-web/coder"
|
||||||
version = "1.1.0"
|
version = "1.2.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
extensions = ["dracula-theme.theme-dracula"]
|
extensions = ["dracula-theme.theme-dracula"]
|
||||||
settings = {
|
settings = {
|
||||||
@ -78,7 +78,7 @@ By default, this module installs the latest. To pin a specific version, retrieve
|
|||||||
module "vscode-web" {
|
module "vscode-web" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/vscode-web/coder"
|
source = "registry.coder.com/coder/vscode-web/coder"
|
||||||
version = "1.1.0"
|
version = "1.2.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
commit_id = "e54c774e0add60467559eb0d1e229c6452cf8447"
|
commit_id = "e54c774e0add60467559eb0d1e229c6452cf8447"
|
||||||
accept_license = true
|
accept_license = true
|
||||||
|
|||||||
@ -4,7 +4,7 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
coder = {
|
coder = {
|
||||||
source = "coder/coder"
|
source = "coder/coder"
|
||||||
version = ">= 0.17"
|
version = ">= 2.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -97,6 +97,12 @@ variable "order" {
|
|||||||
default = null
|
default = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "group" {
|
||||||
|
type = string
|
||||||
|
description = "The name of a group that this app belongs to."
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
variable "settings" {
|
variable "settings" {
|
||||||
type = any
|
type = any
|
||||||
description = "A map of settings to apply to VS Code web."
|
description = "A map of settings to apply to VS Code web."
|
||||||
@ -194,6 +200,7 @@ resource "coder_app" "vscode-web" {
|
|||||||
subdomain = var.subdomain
|
subdomain = var.subdomain
|
||||||
share = var.share
|
share = var.share
|
||||||
order = var.order
|
order = var.order
|
||||||
|
group = var.group
|
||||||
|
|
||||||
healthcheck {
|
healthcheck {
|
||||||
url = local.healthcheck_url
|
url = local.healthcheck_url
|
||||||
|
|||||||
@ -17,7 +17,7 @@ Uses the [Coder Remote VS Code Extension](https://github.com/coder/vscode-coder)
|
|||||||
module "windsurf" {
|
module "windsurf" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/windsurf/coder"
|
source = "registry.coder.com/coder/windsurf/coder"
|
||||||
version = "1.0.0"
|
version = "1.1.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -30,7 +30,7 @@ module "windsurf" {
|
|||||||
module "windsurf" {
|
module "windsurf" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/windsurf/coder"
|
source = "registry.coder.com/coder/windsurf/coder"
|
||||||
version = "1.0.0"
|
version = "1.1.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
folder = "/home/coder/project"
|
folder = "/home/coder/project"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,7 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
coder = {
|
coder = {
|
||||||
source = "coder/coder"
|
source = "coder/coder"
|
||||||
version = ">= 0.23"
|
version = ">= 2.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -32,6 +32,12 @@ variable "order" {
|
|||||||
default = null
|
default = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "group" {
|
||||||
|
type = string
|
||||||
|
description = "The name of a group that this app belongs to."
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
data "coder_workspace" "me" {}
|
data "coder_workspace" "me" {}
|
||||||
data "coder_workspace_owner" "me" {}
|
data "coder_workspace_owner" "me" {}
|
||||||
|
|
||||||
@ -42,6 +48,7 @@ resource "coder_app" "windsurf" {
|
|||||||
slug = "windsurf"
|
slug = "windsurf"
|
||||||
display_name = "Windsurf Editor"
|
display_name = "Windsurf Editor"
|
||||||
order = var.order
|
order = var.order
|
||||||
|
group = var.group
|
||||||
url = join("", [
|
url = join("", [
|
||||||
"windsurf://coder.coder-remote/open",
|
"windsurf://coder.coder-remote/open",
|
||||||
"?owner=",
|
"?owner=",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user