Change variable name to default

Co-authored-by: Muhammad Atif Ali <me@matifali.dev>
pull/224/head
djarbz 1 year ago committed by GitHub
parent 1966ed1078
commit 4893f172c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -28,6 +28,6 @@ module "dotfiles" {
source = "registry.coder.com/modules/dotfiles/coder" source = "registry.coder.com/modules/dotfiles/coder"
version = "1.0.12" version = "1.0.12"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
default_dotfiles_repo = "https://github.com/coder/dotfiles" default = "https://github.com/coder/dotfiles"
} }
``` ```

@ -20,11 +20,11 @@ describe("dotfiles", async () => {
}); });
it("set a default dotfiles_uri", async () => { it("set a default dotfiles_uri", async () => {
const default_dotfiles_uri = "foo"; const default = "foo";
const state = await runTerraformApply(import.meta.dir, { const state = await runTerraformApply(import.meta.dir, {
agent_id: "foo", agent_id: "foo",
default_dotfiles_uri, default,
}); });
expect(state.outputs.dotfiles_uri.value).toBe(default_dotfiles_uri); expect(state.outputs.dotfiles_uri.value).toBe(default);
}); });
}); });

@ -14,7 +14,7 @@ variable "agent_id" {
description = "The ID of a Coder agent." description = "The ID of a Coder agent."
} }
variable "default_dotfiles_uri" { variable "default" {
type = string type = string
description = "The default dotfiles URI if the workspace user does not provide one." description = "The default dotfiles URI if the workspace user does not provide one."
default = "" default = ""
@ -24,7 +24,7 @@ data "coder_parameter" "dotfiles_uri" {
type = "string" type = "string"
name = "dotfiles_uri" name = "dotfiles_uri"
display_name = "Dotfiles URL (optional)" display_name = "Dotfiles URL (optional)"
default = var.default_dotfiles_uri default = var.default
description = "Enter a URL for a [dotfiles repository](https://dotfiles.github.io) to personalize your workspace" description = "Enter a URL for a [dotfiles repository](https://dotfiles.github.io) to personalize your workspace"
mutable = true mutable = true
icon = "/icon/dotfiles.svg" icon = "/icon/dotfiles.svg"
@ -50,5 +50,5 @@ output "dotfiles_uri" {
output "dotfiles_default_uri" { output "dotfiles_default_uri" {
description = "Dotfiles Default URI" description = "Dotfiles Default URI"
value = var.default_dotfiles_uri value = var.default
} }
Loading…
Cancel
Save