From 6456b77871deec99aa6d372457a50d7470ad83ed Mon Sep 17 00:00:00 2001 From: justmanuel <56279646+justmanuel@users.noreply.github.com> Date: Wed, 25 Feb 2026 15:22:26 -0500 Subject: [PATCH 01/11] Update devcontainer cli module allow devcontainer cli module to specify if it should block user login or not --- registry/coder/modules/devcontainers-cli/main.tf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/registry/coder/modules/devcontainers-cli/main.tf b/registry/coder/modules/devcontainers-cli/main.tf index a2aee348b..66f19f44a 100644 --- a/registry/coder/modules/devcontainers-cli/main.tf +++ b/registry/coder/modules/devcontainers-cli/main.tf @@ -14,10 +14,18 @@ variable "agent_id" { description = "The ID of a Coder agent." } +variable "start_blocks_login " { + type = string + default = false + description = "Boolean, This option determines whether users can log in immediately or must wait for the workspace to finish running this script upon startup." +} + resource "coder_script" "devcontainers-cli" { agent_id = var.agent_id display_name = "devcontainers-cli" icon = "/icon/devcontainers.svg" script = templatefile("${path.module}/run.sh", {}) run_on_start = true + start_blocks_login = var.start_blocks_login + start_blocks_login } From a1d71d439d9b734088b4d6f945051ac4dd1fd43f Mon Sep 17 00:00:00 2001 From: justmanuel <56279646+justmanuel@users.noreply.github.com> Date: Wed, 25 Feb 2026 15:32:19 -0500 Subject: [PATCH 02/11] Update main.test.ts --- registry/coder/modules/devcontainers-cli/main.test.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/registry/coder/modules/devcontainers-cli/main.test.ts b/registry/coder/modules/devcontainers-cli/main.test.ts index 5a4d34e8e..6f4d5ccdd 100644 --- a/registry/coder/modules/devcontainers-cli/main.test.ts +++ b/registry/coder/modules/devcontainers-cli/main.test.ts @@ -73,11 +73,13 @@ describe("devcontainers-cli", async () => { testRequiredVariables(import.meta.dir, { agent_id: "some-agent-id", + start_blocks_login: boolean = false; }); it("misses all package managers", async () => { const state = await runTerraformApply(import.meta.dir, { agent_id: "some-agent-id", + start_blocks_login: boolean = false; }); const output = await executeScriptInContainer(state, "docker:dind"); expect(output.exitCode).toBe(1); @@ -89,6 +91,7 @@ describe("devcontainers-cli", async () => { it("installs devcontainers-cli with npm", async () => { const state = await runTerraformApply(import.meta.dir, { agent_id: "some-agent-id", + start_blocks_login: boolean = false; }); const output = await executeScriptInContainerWithPackageManager( @@ -109,6 +112,7 @@ describe("devcontainers-cli", async () => { it("installs devcontainers-cli with yarn", async () => { const state = await runTerraformApply(import.meta.dir, { agent_id: "some-agent-id", + start_blocks_login: boolean = false; }); const output = await executeScriptInContainerWithPackageManager( @@ -129,6 +133,7 @@ describe("devcontainers-cli", async () => { it("displays warning if docker is not installed", async () => { const state = await runTerraformApply(import.meta.dir, { agent_id: "some-agent-id", + start_blocks_login: boolean = false; }); const output = await executeScriptInContainerWithPackageManager( From be389938326ef0f22b832084af1d47b0ad971d43 Mon Sep 17 00:00:00 2001 From: justmanuel <56279646+justmanuel@users.noreply.github.com> Date: Wed, 25 Feb 2026 15:35:58 -0500 Subject: [PATCH 03/11] fix test --- registry/coder/modules/devcontainers-cli/main.test.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/registry/coder/modules/devcontainers-cli/main.test.ts b/registry/coder/modules/devcontainers-cli/main.test.ts index 6f4d5ccdd..7015dee5e 100644 --- a/registry/coder/modules/devcontainers-cli/main.test.ts +++ b/registry/coder/modules/devcontainers-cli/main.test.ts @@ -73,13 +73,13 @@ describe("devcontainers-cli", async () => { testRequiredVariables(import.meta.dir, { agent_id: "some-agent-id", - start_blocks_login: boolean = false; + start_blocks_login: false, }); it("misses all package managers", async () => { const state = await runTerraformApply(import.meta.dir, { agent_id: "some-agent-id", - start_blocks_login: boolean = false; + start_blocks_login: false, }); const output = await executeScriptInContainer(state, "docker:dind"); expect(output.exitCode).toBe(1); @@ -91,7 +91,7 @@ describe("devcontainers-cli", async () => { it("installs devcontainers-cli with npm", async () => { const state = await runTerraformApply(import.meta.dir, { agent_id: "some-agent-id", - start_blocks_login: boolean = false; + start_blocks_login: false, }); const output = await executeScriptInContainerWithPackageManager( @@ -112,7 +112,7 @@ describe("devcontainers-cli", async () => { it("installs devcontainers-cli with yarn", async () => { const state = await runTerraformApply(import.meta.dir, { agent_id: "some-agent-id", - start_blocks_login: boolean = false; + start_blocks_login: false, }); const output = await executeScriptInContainerWithPackageManager( @@ -133,7 +133,7 @@ describe("devcontainers-cli", async () => { it("displays warning if docker is not installed", async () => { const state = await runTerraformApply(import.meta.dir, { agent_id: "some-agent-id", - start_blocks_login: boolean = false; + start_blocks_login: false, }); const output = await executeScriptInContainerWithPackageManager( From 22428cf86ee907853ef7330b514030dd57cf11be Mon Sep 17 00:00:00 2001 From: justmanuel <56279646+justmanuel@users.noreply.github.com> Date: Thu, 26 Feb 2026 09:10:43 -0500 Subject: [PATCH 04/11] Apply suggestions from code review Co-authored-by: DevCats --- registry/coder/modules/devcontainers-cli/main.tf | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/registry/coder/modules/devcontainers-cli/main.tf b/registry/coder/modules/devcontainers-cli/main.tf index 66f19f44a..14dbed627 100644 --- a/registry/coder/modules/devcontainers-cli/main.tf +++ b/registry/coder/modules/devcontainers-cli/main.tf @@ -14,8 +14,8 @@ variable "agent_id" { description = "The ID of a Coder agent." } -variable "start_blocks_login " { - type = string +variable "start_blocks_login" { + type = bool default = false description = "Boolean, This option determines whether users can log in immediately or must wait for the workspace to finish running this script upon startup." } @@ -27,5 +27,4 @@ resource "coder_script" "devcontainers-cli" { script = templatefile("${path.module}/run.sh", {}) run_on_start = true start_blocks_login = var.start_blocks_login - start_blocks_login } From 2f8729938e3f252727ce3c2c00d65ed0e719a25c Mon Sep 17 00:00:00 2001 From: justmanuel <56279646+justmanuel@users.noreply.github.com> Date: Thu, 26 Feb 2026 09:13:40 -0500 Subject: [PATCH 05/11] fix test removing start_blocks_login: false where not needed in test --- registry/coder/modules/devcontainers-cli/main.test.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/registry/coder/modules/devcontainers-cli/main.test.ts b/registry/coder/modules/devcontainers-cli/main.test.ts index 7015dee5e..c1a3b2675 100644 --- a/registry/coder/modules/devcontainers-cli/main.test.ts +++ b/registry/coder/modules/devcontainers-cli/main.test.ts @@ -79,7 +79,6 @@ describe("devcontainers-cli", async () => { it("misses all package managers", async () => { const state = await runTerraformApply(import.meta.dir, { agent_id: "some-agent-id", - start_blocks_login: false, }); const output = await executeScriptInContainer(state, "docker:dind"); expect(output.exitCode).toBe(1); @@ -91,7 +90,6 @@ describe("devcontainers-cli", async () => { it("installs devcontainers-cli with npm", async () => { const state = await runTerraformApply(import.meta.dir, { agent_id: "some-agent-id", - start_blocks_login: false, }); const output = await executeScriptInContainerWithPackageManager( @@ -112,7 +110,6 @@ describe("devcontainers-cli", async () => { it("installs devcontainers-cli with yarn", async () => { const state = await runTerraformApply(import.meta.dir, { agent_id: "some-agent-id", - start_blocks_login: false, }); const output = await executeScriptInContainerWithPackageManager( @@ -133,7 +130,6 @@ describe("devcontainers-cli", async () => { it("displays warning if docker is not installed", async () => { const state = await runTerraformApply(import.meta.dir, { agent_id: "some-agent-id", - start_blocks_login: false, }); const output = await executeScriptInContainerWithPackageManager( From 62a5d7f8b2db28ec405fe6f948d8c92f044a6766 Mon Sep 17 00:00:00 2001 From: justmanuel <56279646+justmanuel@users.noreply.github.com> Date: Thu, 26 Feb 2026 09:21:14 -0500 Subject: [PATCH 06/11] Update README.md Update proposed version --- registry/coder/modules/devcontainers-cli/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry/coder/modules/devcontainers-cli/README.md b/registry/coder/modules/devcontainers-cli/README.md index bb5ec6dec..ba1c643d1 100644 --- a/registry/coder/modules/devcontainers-cli/README.md +++ b/registry/coder/modules/devcontainers-cli/README.md @@ -15,7 +15,7 @@ The devcontainers-cli module provides an easy way to install [`@devcontainers/cl ```tf module "devcontainers-cli" { source = "registry.coder.com/coder/devcontainers-cli/coder" - version = "1.0.34" + version = "1.1.0" agent_id = coder_agent.example.id } ``` From cf9a6d4fe45c5d4a2db4cb7b6d6659bb23930a88 Mon Sep 17 00:00:00 2001 From: justmanuel <56279646+justmanuel@users.noreply.github.com> Date: Thu, 26 Feb 2026 09:22:21 -0500 Subject: [PATCH 07/11] Update README.md add variable proposed --- registry/coder/modules/devcontainers-cli/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/registry/coder/modules/devcontainers-cli/README.md b/registry/coder/modules/devcontainers-cli/README.md index ba1c643d1..1e18e4a6d 100644 --- a/registry/coder/modules/devcontainers-cli/README.md +++ b/registry/coder/modules/devcontainers-cli/README.md @@ -17,5 +17,6 @@ module "devcontainers-cli" { source = "registry.coder.com/coder/devcontainers-cli/coder" version = "1.1.0" agent_id = coder_agent.example.id + start_blocks_login = false } ``` From b81b3bcbf444ae2bbbec5d192c3e9a48e6a7b615 Mon Sep 17 00:00:00 2001 From: justmanuel <56279646+justmanuel@users.noreply.github.com> Date: Thu, 26 Feb 2026 09:41:25 -0500 Subject: [PATCH 08/11] Update main.test.ts Remove variable as not needed since terraform has a default value for it and fails test when specified. --- registry/coder/modules/devcontainers-cli/main.test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/registry/coder/modules/devcontainers-cli/main.test.ts b/registry/coder/modules/devcontainers-cli/main.test.ts index c1a3b2675..5a4d34e8e 100644 --- a/registry/coder/modules/devcontainers-cli/main.test.ts +++ b/registry/coder/modules/devcontainers-cli/main.test.ts @@ -73,7 +73,6 @@ describe("devcontainers-cli", async () => { testRequiredVariables(import.meta.dir, { agent_id: "some-agent-id", - start_blocks_login: false, }); it("misses all package managers", async () => { From 262d9f2b4213e8a8d4208615a2ca13c3bfafb34b Mon Sep 17 00:00:00 2001 From: justmanuel <56279646+justmanuel@users.noreply.github.com> Date: Thu, 26 Feb 2026 09:45:57 -0500 Subject: [PATCH 09/11] Update main.tf fix formatting of main.tf --- registry/coder/modules/devcontainers-cli/main.tf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/registry/coder/modules/devcontainers-cli/main.tf b/registry/coder/modules/devcontainers-cli/main.tf index 14dbed627..16fa35fe9 100644 --- a/registry/coder/modules/devcontainers-cli/main.tf +++ b/registry/coder/modules/devcontainers-cli/main.tf @@ -21,10 +21,10 @@ variable "start_blocks_login" { } resource "coder_script" "devcontainers-cli" { - agent_id = var.agent_id - display_name = "devcontainers-cli" - icon = "/icon/devcontainers.svg" - script = templatefile("${path.module}/run.sh", {}) - run_on_start = true + agent_id = var.agent_id + display_name = "devcontainers-cli" + icon = "/icon/devcontainers.svg" + script = templatefile("${path.module}/run.sh", {}) + run_on_start = true start_blocks_login = var.start_blocks_login } From 3a1f1f018deb559ddb9cf0664ba95759cc8abda6 Mon Sep 17 00:00:00 2001 From: justmanuel <56279646+justmanuel@users.noreply.github.com> Date: Thu, 26 Feb 2026 09:46:59 -0500 Subject: [PATCH 10/11] Update formatting README.md --- registry/coder/modules/devcontainers-cli/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/registry/coder/modules/devcontainers-cli/README.md b/registry/coder/modules/devcontainers-cli/README.md index 1e18e4a6d..f39bcd66a 100644 --- a/registry/coder/modules/devcontainers-cli/README.md +++ b/registry/coder/modules/devcontainers-cli/README.md @@ -14,9 +14,9 @@ The devcontainers-cli module provides an easy way to install [`@devcontainers/cl ```tf module "devcontainers-cli" { - source = "registry.coder.com/coder/devcontainers-cli/coder" - version = "1.1.0" - agent_id = coder_agent.example.id + source = "registry.coder.com/coder/devcontainers-cli/coder" + version = "1.1.0" + agent_id = coder_agent.example.id start_blocks_login = false } ``` From 04b278550ddbe0fe8c9d8d9b9852d3d82b3790ee Mon Sep 17 00:00:00 2001 From: justmanuel <56279646+justmanuel@users.noreply.github.com> Date: Thu, 26 Feb 2026 11:31:56 -0500 Subject: [PATCH 11/11] Update README.md format update format to match bun fmt --- registry/coder/modules/devcontainers-cli/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/registry/coder/modules/devcontainers-cli/README.md b/registry/coder/modules/devcontainers-cli/README.md index f39bcd66a..771be25da 100644 --- a/registry/coder/modules/devcontainers-cli/README.md +++ b/registry/coder/modules/devcontainers-cli/README.md @@ -14,9 +14,9 @@ The devcontainers-cli module provides an easy way to install [`@devcontainers/cl ```tf module "devcontainers-cli" { - source = "registry.coder.com/coder/devcontainers-cli/coder" - version = "1.1.0" - agent_id = coder_agent.example.id - start_blocks_login = false + source = "registry.coder.com/coder/devcontainers-cli/coder" + version = "1.1.0" + agent_id = coder_agent.example.id + start_blocks_login = false } ```