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

@ -13,11 +13,11 @@ This module adds a JetBrains Gateway Button to open any workspace with a single
```hcl
module "jetbrains_gateway" {
source = "https://registry.coder.com/modules/jetbrains-gateway"
agent_id = coder_agent.example.id
agent_name = "example"
project_directory = "/home/coder/example"
jetbrains_ides = ["GO", "WS", "IU", "IC", "PY", "PC", "PS", "CL", "RM", "DB", "RD"]
source = "https://registry.coder.com/modules/jetbrains-gateway"
agent_id = coder_agent.example.id
agent_name = "example"
folder = "/home/coder/example"
jetbrains_ides = ["GO", "WS", "IU", "IC", "PY", "PC", "PS", "CL", "RM", "DB", "RD"]
}
```
@ -29,12 +29,12 @@ module "jetbrains_gateway" {
```hcl
module "jetbrains_gateway" {
source = "https://registry.coder.com/modules/jetbrains-gateway"
agent_id = coder_agent.example.id
agent_name = "example"
project_directory = "/home/coder/example"
jetbrains_ides = ["GO", "WS"]
default = "GO"
source = "https://registry.coder.com/modules/jetbrains-gateway"
agent_id = coder_agent.example.id
agent_name = "example"
folder = "/home/coder/example"
jetbrains_ides = ["GO", "WS"]
default = "GO"
}
```

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

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

Loading…
Cancel
Save