Skip to content

Commit 612e94e

Browse files
committed
update var name, remove deprecation note
1 parent fc7cc77 commit 612e94e

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

registry/coder/modules/jetbrains-gateway/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ module "jetbrains_gateway" {
4747

4848
This can be used when support for connecting to multiple agents within one workspace is required.
4949

50-
To utilise this both `embed_agent_id` and `agent_name` must be populated on each instance of the module.
50+
To utilise this both `embed_agent_name` and `agent_name` must be populated on each instance of the module.
5151
In addition each instance must have a unique `slug` and `ide_parameter_name` variable defined.
5252

5353
```tf
@@ -59,7 +59,7 @@ module "jetbrains_gateway" {
5959
folder = "/home/coder/example"
6060
jetbrains_ides = ["CL", "GO"]
6161
default = "GO"
62-
embed_agent_id = true
62+
embed_agent_name = true
6363
agent_name = "main"
6464
ide_parameter_name = "jetbrains_ide" # default variable value
6565
slug = "gateway" # default variable value
@@ -73,7 +73,7 @@ module "jetbrains_gateway_agent2" {
7373
folder = "/home/coder/example"
7474
jetbrains_ides = ["CL", "GO", "IU", "PY", "WS"]
7575
default = "GO"
76-
embed_agent_id = true
76+
embed_agent_name = true
7777
agent_name = "jetbrainsagent2"
7878
ide_parameter_name = "jetbrains_ide_agent2"
7979
slug = "gateway-agent2"

registry/coder/modules/jetbrains-gateway/main.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ describe("jetbrains-gateway", async () => {
4141
expect(state.outputs.identifier.value).toBe("IU");
4242
});
4343

44-
it("optionally includes agent when embed_agent_id is true", async () => {
44+
it("optionally includes agent when embed_agent_name is true", async () => {
4545
const state = await runTerraformApply(import.meta.dir, {
4646
agent_id: "foo",
4747
agent_name: "main",
4848
folder: "/home/coder",
49-
embed_agent_id: true,
49+
embed_agent_name: true,
5050
});
5151

5252
expect(state.outputs.url.value).toBe(

registry/coder/modules/jetbrains-gateway/main.tf

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ variable "slug" {
3636

3737
variable "agent_name" {
3838
type = string
39-
description = "Agent name. (unused). Will be removed in a future version"
40-
39+
description = "Agent name."
4140
default = ""
4241
}
4342

@@ -68,7 +67,7 @@ variable "group" {
6867
default = null
6968
}
7069

71-
variable "embed_agent_id" {
70+
variable "embed_agent_name" {
7271
type = bool
7372
description = "Embed the agent name in the JetBrains Gateway URL when support for multiple agents is required."
7473
default = false
@@ -360,7 +359,7 @@ resource "coder_app" "gateway" {
360359
local.build_number,
361360
"&ide_download_link=",
362361
local.download_link,
363-
], var.embed_agent_id && trimspace(var.agent_name) != "" ? ["&agent=", var.agent_name] : []))
362+
], var.embed_agent_name && trimspace(var.agent_name) != "" ? ["&agent=", var.agent_name] : []))
364363
}
365364

366365
output "identifier" {

0 commit comments

Comments
 (0)