Add owner to Gateway link (#310)

Without this, it is not possible to reliably connect to another user's
workspace (for admins, mainly) when duplicate workspace names are
involved.
This commit is contained in:
Asher
2024-10-08 05:16:01 +00:00
committed by GitHub
parent 438c904567
commit 8a0ac3435c
3 changed files with 27 additions and 4 deletions

View File

@@ -243,6 +243,7 @@ data "coder_parameter" "jetbrains_ide" {
}
data "coder_workspace" "me" {}
data "coder_workspace_owner" "me" {}
resource "coder_app" "gateway" {
agent_id = var.agent_id
@@ -254,6 +255,8 @@ resource "coder_app" "gateway" {
url = join("", [
"jetbrains-gateway://connect#type=coder&workspace=",
data.coder_workspace.me.name,
"&owner=",
data.coder_workspace_owner.me.name,
"&agent=",
var.agent_name,
"&folder=",