Skip to content

vscode-web failed #352

@anasfanani

Description

@anasfanani

2025-08-21 09:24:43.673Z Error: Invalid function argument
2025-08-21 09:24:43.673Z on .terraform/modules/vscode-web/main.tf line 235, in locals:
2025-08-21 09:24:43.673Z   235:     "http://localhost:${var.port}${local.server_base_path}?workspace=${urlencode(var.workspace)}" :
2025-08-21 09:24:43.673Z     ├────────────────
2025-08-21 09:24:43.673Z     │ var.workspace is null
2025-08-21 09:24:43.673Z 
2025-08-21 09:24:43.673Z Invalid value for "str" parameter: argument must not be null.
2025-08-21 09:24:43.675Z Error: Error in function call
2025-08-21 09:24:43.675Z on .terraform/modules/vscode-web/main.tf line 174, in resource "coder_script" "vscode-web":
2025-08-21 09:24:43.675Z   174:   script = templatefile("${path.module}/run.sh", {
2025-08-21 09:24:43.675Z   175:     PORT : var.port,
2025-08-21 09:24:43.675Z   176:     LOG_PATH : var.log_path,
2025-08-21 09:24:43.676Z   177:     INSTALL_PREFIX : var.install_prefix,
2025-08-21 09:24:43.676Z   178:     EXTENSIONS : join(",", var.extensions),
2025-08-21 09:24:43.676Z   179:     TELEMETRY_LEVEL : var.telemetry_level,
2025-08-21 09:24:43.676Z   180:     // This is necessary otherwise the quotes are stripped!
2025-08-21 09:24:43.676Z   181:     SETTINGS : replace(jsonencode(var.settings), "\"", "\\\""),
2025-08-21 09:24:43.676Z   182:     OFFLINE : var.offline,
2025-08-21 09:24:43.676Z   183:     USE_CACHED : var.use_cached,
2025-08-21 09:24:43.676Z   184:     DISABLE_TRUST : var.disable_trust,
2025-08-21 09:24:43.676Z   185:     EXTENSIONS_DIR : var.extensions_dir,
2025-08-21 09:24:43.676Z   186:     FOLDER : var.folder,
2025-08-21 09:24:43.676Z   187:     WORKSPACE : var.workspace,
2025-08-21 09:24:43.676Z   188:     AUTO_INSTALL_EXTENSIONS : var.auto_install_extensions,
2025-08-21 09:24:43.676Z   189:     SERVER_BASE_PATH : local.server_base_path,
2025-08-21 09:24:43.676Z   190:     COMMIT_ID : var.commit_id,
2025-08-21 09:24:43.676Z   191:     PLATFORM : var.platform,
2025-08-21 09:24:43.676Z   192:   })
2025-08-21 09:24:43.676Z     ├────────────────
2025-08-21 09:24:43.676Z     │ local.server_base_path is ""
2025-08-21 09:24:43.676Z     │ path.module is ".terraform/modules/vscode-web"
2025-08-21 09:24:43.676Z     │ var.auto_install_extensions is false
2025-08-21 09:24:43.676Z     │ var.commit_id is ""
2025-08-21 09:24:43.676Z     │ var.disable_trust is true
2025-08-21 09:24:43.676Z     │ var.extensions is empty list of string
2025-08-21 09:24:43.676Z     │ var.extensions_dir is ""
2025-08-21 09:24:43.676Z     │ var.folder is ""
2025-08-21 09:24:43.677Z     │ var.install_prefix is "$HOME/vscode-web"
2025-08-21 09:24:43.677Z     │ var.log_path is "/tmp/vscode-web.log"
2025-08-21 09:24:43.677Z     │ var.offline is false
2025-08-21 09:24:43.677Z     │ var.platform is ""
2025-08-21 09:24:43.677Z     │ var.port is 13338
2025-08-21 09:24:43.677Z     │ var.settings is object with 4 attributes
2025-08-21 09:24:43.677Z     │ var.telemetry_level is "error"
2025-08-21 09:24:43.677Z     │ var.use_cached is true
2025-08-21 09:24:43.677Z     │ var.workspace is null
2025-08-21 09:24:43.677Z 
2025-08-21 09:24:43.677Z Call to function "templatefile" failed: .terraform/modules/vscode-web/run.sh:113,16-25: Invalid template interpolation value; The expression result is null. Cannot include a null value in a string template., and 3 other diagnostic(s).

Possible problem:

variable "workspace" {
  type        = string
  description = "Path to a .code-workspace file to open in vscode-web."
  default     = null
}

default should not null

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions