rename `project_directory` to `folder`

This will match this with other modules.
This is a breaking change and all templates
using this module should update.
pull/72/head
Muhammad Atif Ali 2 years ago
parent d56d0a4f6f
commit dbbea25187
No known key found for this signature in database

@ -16,7 +16,7 @@ module "jetbrains_gateway" {
source = "https://registry.coder.com/modules/jetbrains-gateway" source = "https://registry.coder.com/modules/jetbrains-gateway"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
agent_name = "example" agent_name = "example"
project_directory = "/home/coder/example" folder = "/home/coder/example"
jetbrains_ides = ["GO", "WS", "IU", "IC", "PY", "PC", "PS", "CL", "RM", "DB", "RD"] jetbrains_ides = ["GO", "WS", "IU", "IC", "PY", "PC", "PS", "CL", "RM", "DB", "RD"]
} }
``` ```
@ -32,7 +32,7 @@ module "jetbrains_gateway" {
source = "https://registry.coder.com/modules/jetbrains-gateway" source = "https://registry.coder.com/modules/jetbrains-gateway"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
agent_name = "example" agent_name = "example"
project_directory = "/home/coder/example" folder = "/home/coder/example"
jetbrains_ides = ["GO", "WS"] jetbrains_ides = ["GO", "WS"]
default = "GO" default = "GO"
} }

@ -1,7 +1,5 @@
import { describe, expect, it } from "bun:test"; import { describe } from "bun:test";
import { import {
executeScriptInContainer,
runTerraformApply,
runTerraformInit, runTerraformInit,
testRequiredVariables, testRequiredVariables,
} from "../test"; } from "../test";
@ -12,7 +10,7 @@ describe("jetbrains-gateway`", async () => {
await testRequiredVariables(import.meta.dir, { await testRequiredVariables(import.meta.dir, {
agent_id: "foo", agent_id: "foo",
agent_name: "bar", agent_name: "bar",
project_directory: "/baz/", folder: "/baz/",
jetbrains_ides: '["IU", "IC", "PY"]', jetbrains_ides: '["IU", "IC", "PY"]',
}); });
}); });

@ -19,7 +19,7 @@ variable "agent_name" {
description = "The name of a Coder agent." description = "The name of a Coder agent."
} }
variable "project_directory" { variable "folder" {
type = string type = string
description = "The directory to open in the IDE. e.g. /home/coder/project" description = "The directory to open in the IDE. e.g. /home/coder/project"
} }
@ -146,7 +146,7 @@ resource "coder_app" "gateway" {
"&agent=", "&agent=",
var.agent_name, var.agent_name,
"&folder=", "&folder=",
var.project_directory, var.folder,
"&url=", "&url=",
data.coder_workspace.me.access_url, data.coder_workspace.me.access_url,
"&token=", "&token=",

Loading…
Cancel
Save