From 8e0dfcd5347ed7a6a0532df1cf91f3f0c55473e3 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Thu, 17 Oct 2024 07:25:03 -0700 Subject: [PATCH] feat(jetbrains-gateway): add slug variable (#322) --- jetbrains-gateway/README.md | 8 ++++---- jetbrains-gateway/main.tf | 8 +++++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/jetbrains-gateway/README.md b/jetbrains-gateway/README.md index 99bc5bd..0745fa7 100644 --- a/jetbrains-gateway/README.md +++ b/jetbrains-gateway/README.md @@ -14,7 +14,7 @@ This module adds a JetBrains Gateway Button to open any workspace with a single ```tf module "jetbrains_gateway" { source = "registry.coder.com/modules/jetbrains-gateway/coder" - version = "1.0.20" + version = "1.0.21" agent_id = coder_agent.example.id agent_name = "example" folder = "/home/coder/example" @@ -32,7 +32,7 @@ module "jetbrains_gateway" { ```tf module "jetbrains_gateway" { source = "registry.coder.com/modules/jetbrains-gateway/coder" - version = "1.0.20" + version = "1.0.21" agent_id = coder_agent.example.id agent_name = "example" folder = "/home/coder/example" @@ -46,7 +46,7 @@ module "jetbrains_gateway" { ```tf module "jetbrains_gateway" { source = "registry.coder.com/modules/jetbrains-gateway/coder" - version = "1.0.20" + version = "1.0.21" agent_id = coder_agent.example.id agent_name = "example" folder = "/home/coder/example" @@ -61,7 +61,7 @@ module "jetbrains_gateway" { ```tf module "jetbrains_gateway" { source = "registry.coder.com/modules/jetbrains-gateway/coder" - version = "1.0.20" + version = "1.0.21" agent_id = coder_agent.example.id agent_name = "example" folder = "/home/coder/example" diff --git a/jetbrains-gateway/main.tf b/jetbrains-gateway/main.tf index d4474b2..2bc00d3 100644 --- a/jetbrains-gateway/main.tf +++ b/jetbrains-gateway/main.tf @@ -18,6 +18,12 @@ variable "agent_id" { description = "The ID of a Coder agent." } +variable "slug" { + type = string + description = "The slug for the coder_app. Allows resuing the module with the same template." + default = "gateway" +} + variable "agent_name" { type = string description = "Agent name." @@ -247,7 +253,7 @@ data "coder_workspace_owner" "me" {} resource "coder_app" "gateway" { agent_id = var.agent_id - slug = "gateway" + slug = var.slug display_name = local.display_name icon = local.icon external = true