Skip to content

bug: log_path in coder script causes the script to fail silently #21986

Description

@35C4n0r

Current Behavior

For a "coder_script" if the log_path is in a directory that does not exist, the script fails silently without any trace. This makes debugging for module developer difficult and time consuming.

Expected Behavior

  • Either the script fails with logs
  • Or the directory is created and the script doesn't fail.

Steps to Reproduce

resource "coder_script" "install_script" {
  log_path     = ".claude-module/install.log"  # and the directory doesn't exist yet
  agent_id     = var.agent_id
  display_name = "Install Script"
  run_on_start = true
  script       = <<-EOT
     #!/bin/bash
      echo "Hello World"
   EOT
}

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions