fix: rename add-project to add_project in mux module (#765)

Terraform variable names should use underscores, not hyphens. Renames
the `add-project` variable to `add_project` in the mux module.

**Changes:**
- `main.tf`: Renamed variable declaration and references
- `README.md`: Updated example usage

Bumped version: 1.3.0 → 1.3.1

---
Generated with [Mux](https://mux.coder.com) using Claude
This commit is contained in:
Michael Suchacz
2026-02-27 17:44:39 +01:00
committed by GitHub
parent 6ec506e9b6
commit 93e6094b1b
2 changed files with 13 additions and 13 deletions
+11 -11
View File
@@ -14,7 +14,7 @@ Automatically install and run [Mux](https://github.com/coder/mux) in a Coder wor
module "mux" { module "mux" {
count = data.coder_workspace.me.start_count count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/mux/coder" source = "registry.coder.com/coder/mux/coder"
version = "1.3.0" version = "1.3.1"
agent_id = coder_agent.main.id agent_id = coder_agent.main.id
} }
``` ```
@@ -37,7 +37,7 @@ module "mux" {
module "mux" { module "mux" {
count = data.coder_workspace.me.start_count count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/mux/coder" source = "registry.coder.com/coder/mux/coder"
version = "1.3.0" version = "1.3.1"
agent_id = coder_agent.main.id agent_id = coder_agent.main.id
} }
``` ```
@@ -48,7 +48,7 @@ module "mux" {
module "mux" { module "mux" {
count = data.coder_workspace.me.start_count count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/mux/coder" source = "registry.coder.com/coder/mux/coder"
version = "1.3.0" version = "1.3.1"
agent_id = coder_agent.main.id agent_id = coder_agent.main.id
# Default is "latest"; set to a specific version to pin # Default is "latest"; set to a specific version to pin
install_version = "0.4.0" install_version = "0.4.0"
@@ -63,9 +63,9 @@ Start Mux with `mux server --add-project /path/to/project`:
module "mux" { module "mux" {
count = data.coder_workspace.me.start_count count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/mux/coder" source = "registry.coder.com/coder/mux/coder"
version = "1.3.0" version = "1.3.1"
agent_id = coder_agent.main.id agent_id = coder_agent.main.id
add-project = "/path/to/project" add_project = "/path/to/project"
} }
``` ```
@@ -78,7 +78,7 @@ The module parses quoted values, so grouped arguments remain intact.
module "mux" { module "mux" {
count = data.coder_workspace.me.start_count count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/mux/coder" source = "registry.coder.com/coder/mux/coder"
version = "1.3.0" version = "1.3.1"
agent_id = coder_agent.main.id agent_id = coder_agent.main.id
additional_arguments = "--open-mode pinned --add-project '/workspaces/my repo'" additional_arguments = "--open-mode pinned --add-project '/workspaces/my repo'"
} }
@@ -90,7 +90,7 @@ module "mux" {
module "mux" { module "mux" {
count = data.coder_workspace.me.start_count count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/mux/coder" source = "registry.coder.com/coder/mux/coder"
version = "1.3.0" version = "1.3.1"
agent_id = coder_agent.main.id agent_id = coder_agent.main.id
port = 8080 port = 8080
} }
@@ -104,7 +104,7 @@ Force a specific package manager instead of auto-detection:
module "mux" { module "mux" {
count = data.coder_workspace.me.start_count count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/mux/coder" source = "registry.coder.com/coder/mux/coder"
version = "1.3.0" version = "1.3.1"
agent_id = coder_agent.main.id agent_id = coder_agent.main.id
package_manager = "pnpm" # or "npm", "bun" package_manager = "pnpm" # or "npm", "bun"
} }
@@ -118,7 +118,7 @@ Use a private or mirrored npm registry:
module "mux" { module "mux" {
count = data.coder_workspace.me.start_count count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/mux/coder" source = "registry.coder.com/coder/mux/coder"
version = "1.3.0" version = "1.3.1"
agent_id = coder_agent.main.id agent_id = coder_agent.main.id
registry_url = "https://npm.pkg.github.com" registry_url = "https://npm.pkg.github.com"
} }
@@ -132,7 +132,7 @@ Run an existing copy of Mux if found, otherwise install from npm:
module "mux" { module "mux" {
count = data.coder_workspace.me.start_count count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/mux/coder" source = "registry.coder.com/coder/mux/coder"
version = "1.3.0" version = "1.3.1"
agent_id = coder_agent.main.id agent_id = coder_agent.main.id
use_cached = true use_cached = true
} }
@@ -146,7 +146,7 @@ Run without installing from the network (requires Mux to be pre-installed):
module "mux" { module "mux" {
count = data.coder_workspace.me.start_count count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/mux/coder" source = "registry.coder.com/coder/mux/coder"
version = "1.3.0" version = "1.3.1"
agent_id = coder_agent.main.id agent_id = coder_agent.main.id
install = false install = false
} }
+2 -2
View File
@@ -49,7 +49,7 @@ variable "log_path" {
default = "/tmp/mux.log" default = "/tmp/mux.log"
} }
variable "add-project" { variable "add_project" {
type = string type = string
description = "Optional path to add/open as a project in Mux on startup." description = "Optional path to add/open as a project in Mux on startup."
default = null default = null
@@ -165,7 +165,7 @@ resource "coder_script" "mux" {
VERSION : var.install_version, VERSION : var.install_version,
PORT : var.port, PORT : var.port,
LOG_PATH : var.log_path, LOG_PATH : var.log_path,
ADD_PROJECT : var.add-project == null ? "" : var.add-project, ADD_PROJECT : var.add_project == null ? "" : var.add_project,
ADDITIONAL_ARGUMENTS : var.additional_arguments, ADDITIONAL_ARGUMENTS : var.additional_arguments,
INSTALL_PREFIX : var.install_prefix, INSTALL_PREFIX : var.install_prefix,
OFFLINE : !var.install, OFFLINE : !var.install,