diff --git a/filebrowser/README.md b/filebrowser/README.md index 65fc5c1..50b503a 100644 --- a/filebrowser/README.md +++ b/filebrowser/README.md @@ -13,9 +13,10 @@ A file browser for your workspace. ```tf module "filebrowser" { - source = "registry.coder.com/modules/filebrowser/coder" - version = "1.0.8" - agent_id = coder_agent.example.id + source = "registry.coder.com/modules/filebrowser/coder" + version = "1.0.8" + agent_id = coder_agent.example.id + agent_name = "main" } ``` @@ -27,10 +28,11 @@ module "filebrowser" { ```tf module "filebrowser" { - source = "registry.coder.com/modules/filebrowser/coder" - version = "1.0.8" - agent_id = coder_agent.example.id - folder = "/home/coder/project" + source = "registry.coder.com/modules/filebrowser/coder" + version = "1.0.8" + agent_id = coder_agent.example.id + agent_name = "main" + folder = "/home/coder/project" } ``` @@ -41,6 +43,7 @@ module "filebrowser" { source = "registry.coder.com/modules/filebrowser/coder" version = "1.0.8" agent_id = coder_agent.example.id + agent_name = "main" database_path = ".config/filebrowser.db" } ``` @@ -50,8 +53,8 @@ module "filebrowser" { ```tf module "filebrowser" { source = "registry.coder.com/modules/filebrowser/coder" - agent_id = coder_agent.main.id - subdomain = false + agent_id = coder_agent.example.id agent_name = "main" + subdomain = false } -``` \ No newline at end of file +``` diff --git a/filebrowser/main.test.ts b/filebrowser/main.test.ts index 311498c..ff6d045 100644 --- a/filebrowser/main.test.ts +++ b/filebrowser/main.test.ts @@ -11,11 +11,13 @@ describe("filebrowser", async () => { testRequiredVariables(import.meta.dir, { agent_id: "foo", + agent_name: "main", }); it("fails with wrong database_path", async () => { const state = await runTerraformApply(import.meta.dir, { agent_id: "foo", + agent_name: "main", database_path: "nofb", }).catch((e) => { if (!e.message.startsWith("\nError: Invalid value for variable")) { @@ -27,6 +29,7 @@ describe("filebrowser", async () => { it("runs with default", async () => { const state = await runTerraformApply(import.meta.dir, { agent_id: "foo", + agent_name: "main", }); const output = await executeScriptInContainer(state, "alpine"); expect(output.exitCode).toBe(0); @@ -48,6 +51,7 @@ describe("filebrowser", async () => { it("runs with database_path var", async () => { const state = await runTerraformApply(import.meta.dir, { agent_id: "foo", + agent_name: "main", database_path: ".config/filebrowser.db", }); const output = await executeScriptInContainer(state, "alpine"); @@ -70,6 +74,7 @@ describe("filebrowser", async () => { it("runs with folder var", async () => { const state = await runTerraformApply(import.meta.dir, { agent_id: "foo", + agent_name: "main", folder: "/home/coder/project", }); const output = await executeScriptInContainer(state, "alpine"); @@ -92,6 +97,7 @@ describe("filebrowser", async () => { it("runs with subdomain=false", async () => { const state = await runTerraformApply(import.meta.dir, { agent_id: "foo", + agent_name: "main", subdomain: false, }); const output = await executeScriptInContainer(state, "alpine");