chore(registry/coder/modules): rename vscode-desktop-core input params (#750)
## Description Rename `web_app_*` suffix to `coder_app_*` ## Type of Change - [ ] New module - [ ] New template - [ ] Bug fix - [x] Feature/enhancement - [ ] Documentation - [ ] Other
This commit is contained in:
parent
8defcb2410
commit
186a779659
@ -16,15 +16,15 @@ The VSCode Desktop Core module is a building block for modules that need to expo
|
|||||||
```tf
|
```tf
|
||||||
module "vscode-desktop-core" {
|
module "vscode-desktop-core" {
|
||||||
source = "registry.coder.com/coder/vscode-desktop-core/coder"
|
source = "registry.coder.com/coder/vscode-desktop-core/coder"
|
||||||
version = "1.0.1"
|
version = "1.0.2"
|
||||||
|
|
||||||
agent_id = var.agent_id
|
agent_id = var.agent_id
|
||||||
|
|
||||||
web_app_icon = "/icon/code.svg"
|
coder_app_icon = "/icon/code.svg"
|
||||||
web_app_slug = "vscode"
|
coder_app_slug = "vscode"
|
||||||
web_app_display_name = "VS Code Desktop"
|
coder_app_display_name = "VS Code Desktop"
|
||||||
web_app_order = var.order
|
coder_app_order = var.order
|
||||||
web_app_group = var.group
|
coder_app_group = var.group
|
||||||
|
|
||||||
folder = var.folder
|
folder = var.folder
|
||||||
open_recent = var.open_recent
|
open_recent = var.open_recent
|
||||||
|
|||||||
@ -11,9 +11,9 @@ const appName = "vscode-desktop";
|
|||||||
const defaultVariables = {
|
const defaultVariables = {
|
||||||
agent_id: "foo",
|
agent_id: "foo",
|
||||||
|
|
||||||
web_app_icon: "/icon/code.svg",
|
coder_app_icon: "/icon/code.svg",
|
||||||
web_app_slug: "vscode",
|
coder_app_slug: "vscode",
|
||||||
web_app_display_name: "VS Code Desktop",
|
coder_app_display_name: "VS Code Desktop",
|
||||||
|
|
||||||
protocol: "vscode",
|
protocol: "vscode",
|
||||||
};
|
};
|
||||||
@ -99,16 +99,16 @@ describe("vscode-desktop-core", async () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
expect(coder_app?.instances[0].attributes.slug).toBe(
|
expect(coder_app?.instances[0].attributes.slug).toBe(
|
||||||
defaultVariables.web_app_slug,
|
defaultVariables.coder_app_slug,
|
||||||
);
|
);
|
||||||
expect(coder_app?.instances[0].attributes.display_name).toBe(
|
expect(coder_app?.instances[0].attributes.display_name).toBe(
|
||||||
defaultVariables.web_app_display_name,
|
defaultVariables.coder_app_display_name,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("sets order", async () => {
|
it("sets order", async () => {
|
||||||
const state = await runTerraformApply(import.meta.dir, {
|
const state = await runTerraformApply(import.meta.dir, {
|
||||||
web_app_order: "5",
|
coder_app_order: "5",
|
||||||
|
|
||||||
...defaultVariables,
|
...defaultVariables,
|
||||||
});
|
});
|
||||||
@ -122,7 +122,7 @@ describe("vscode-desktop-core", async () => {
|
|||||||
|
|
||||||
it("sets group", async () => {
|
it("sets group", async () => {
|
||||||
const state = await runTerraformApply(import.meta.dir, {
|
const state = await runTerraformApply(import.meta.dir, {
|
||||||
web_app_group: "web-app-group",
|
coder_app_group: "web-app-group",
|
||||||
|
|
||||||
...defaultVariables,
|
...defaultVariables,
|
||||||
});
|
});
|
||||||
|
|||||||
@ -31,28 +31,28 @@ variable "protocol" {
|
|||||||
description = "The URI protocol the IDE."
|
description = "The URI protocol the IDE."
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "web_app_icon" {
|
variable "coder_app_icon" {
|
||||||
type = string
|
type = string
|
||||||
description = "The icon of the coder_app."
|
description = "The icon of the coder_app."
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "web_app_slug" {
|
variable "coder_app_slug" {
|
||||||
type = string
|
type = string
|
||||||
description = "The slug of the coder_app."
|
description = "The slug of the coder_app."
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "web_app_display_name" {
|
variable "coder_app_display_name" {
|
||||||
type = string
|
type = string
|
||||||
description = "The display name of the coder_app."
|
description = "The display name of the coder_app."
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "web_app_order" {
|
variable "coder_app_order" {
|
||||||
type = number
|
type = number
|
||||||
description = "The order of the coder_app."
|
description = "The order of the coder_app."
|
||||||
default = null
|
default = null
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "web_app_group" {
|
variable "coder_app_group" {
|
||||||
type = string
|
type = string
|
||||||
description = "The group of the coder_app."
|
description = "The group of the coder_app."
|
||||||
default = null
|
default = null
|
||||||
@ -65,12 +65,12 @@ resource "coder_app" "vscode-desktop" {
|
|||||||
agent_id = var.agent_id
|
agent_id = var.agent_id
|
||||||
external = true
|
external = true
|
||||||
|
|
||||||
icon = var.web_app_icon
|
icon = var.coder_app_icon
|
||||||
slug = var.web_app_slug
|
slug = var.coder_app_slug
|
||||||
display_name = var.web_app_display_name
|
display_name = var.coder_app_display_name
|
||||||
|
|
||||||
order = var.web_app_order
|
order = var.coder_app_order
|
||||||
group = var.web_app_group
|
group = var.coder_app_group
|
||||||
|
|
||||||
url = join("", [
|
url = join("", [
|
||||||
var.protocol,
|
var.protocol,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user