From 8b78673cad42c0a10d6ecee5f8178130f79393da Mon Sep 17 00:00:00 2001 From: austin Date: Sat, 13 Apr 2024 17:01:27 +0000 Subject: [PATCH] Revert "Change variable name to default" This reverts commit 4893f172c39152c310baded71b7a62326b7e855e. --- dotfiles/README.md | 2 +- dotfiles/main.test.ts | 6 +++--- dotfiles/main.tf | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dotfiles/README.md b/dotfiles/README.md index 281d8a9..2939025 100644 --- a/dotfiles/README.md +++ b/dotfiles/README.md @@ -28,6 +28,6 @@ module "dotfiles" { source = "registry.coder.com/modules/dotfiles/coder" version = "1.0.12" agent_id = coder_agent.example.id - default = "https://github.com/coder/dotfiles" + default_dotfiles_repo = "https://github.com/coder/dotfiles" } ``` diff --git a/dotfiles/main.test.ts b/dotfiles/main.test.ts index d7ebcf5..90bc513 100644 --- a/dotfiles/main.test.ts +++ b/dotfiles/main.test.ts @@ -20,11 +20,11 @@ describe("dotfiles", async () => { }); it("set a default dotfiles_uri", async () => { - const default = "foo"; + const default_dotfiles_uri = "foo"; const state = await runTerraformApply(import.meta.dir, { agent_id: "foo", - default, + default_dotfiles_uri, }); - expect(state.outputs.dotfiles_uri.value).toBe(default); + expect(state.outputs.dotfiles_uri.value).toBe(default_dotfiles_uri); }); }); diff --git a/dotfiles/main.tf b/dotfiles/main.tf index 75a65b7..12ca826 100644 --- a/dotfiles/main.tf +++ b/dotfiles/main.tf @@ -14,7 +14,7 @@ variable "agent_id" { description = "The ID of a Coder agent." } -variable "default" { +variable "default_dotfiles_uri" { type = string description = "The default dotfiles URI if the workspace user does not provide one." default = "" @@ -24,7 +24,7 @@ data "coder_parameter" "dotfiles_uri" { type = "string" name = "dotfiles_uri" display_name = "Dotfiles URL (optional)" - default = var.default + default = var.default_dotfiles_uri description = "Enter a URL for a [dotfiles repository](https://dotfiles.github.io) to personalize your workspace" mutable = true icon = "/icon/dotfiles.svg" @@ -50,5 +50,5 @@ output "dotfiles_uri" { output "dotfiles_default_uri" { description = "Dotfiles Default URI" - value = var.default + value = var.default_dotfiles_uri } \ No newline at end of file