Skip to content

Commit 3920709

Browse files
fix(examples): standardize module naming from MODULE_NAME to module_name for tf tests
1 parent 276c61a commit 3920709

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

examples/modules/MODULE_NAME.tftest.hcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ run "app_url_uses_port" {
1515
}
1616

1717
assert {
18-
condition = resource.coder_app.MODULE_NAME.url == "http://localhost:19999"
19-
error_message = "Expected MODULE_NAME app URL to include configured port"
18+
condition = resource.coder_app.module_name.url == "http://localhost:19999"
19+
error_message = "Expected module-name app URL to include configured port"
2020
}
2121
}

examples/modules/main.tf

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ variable "agent_id" {
3535

3636
variable "log_path" {
3737
type = string
38-
description = "The path to log MODULE_NAME to."
39-
default = "/tmp/MODULE_NAME.log"
38+
description = "The path to log module-name to."
39+
default = "/tmp/module-name.log"
4040
}
4141

4242
variable "port" {
4343
type = number
44-
description = "The port to run MODULE_NAME on."
44+
description = "The port to run module-name on."
4545
default = 19999
4646
}
4747

@@ -59,9 +59,9 @@ variable "order" {
5959
# Add other variables here
6060

6161

62-
resource "coder_script" "MODULE_NAME" {
62+
resource "coder_script" "module_name" {
6363
agent_id = var.agent_id
64-
display_name = "MODULE_NAME"
64+
display_name = "Module Name"
6565
icon = local.icon_url
6666
script = templatefile("${path.module}/run.sh", {
6767
LOG_PATH : var.log_path,
@@ -70,10 +70,10 @@ resource "coder_script" "MODULE_NAME" {
7070
run_on_stop = false
7171
}
7272

73-
resource "coder_app" "MODULE_NAME" {
73+
resource "coder_app" "module_name" {
7474
agent_id = var.agent_id
75-
slug = "MODULE_NAME"
76-
display_name = "MODULE_NAME"
75+
slug = "module-name"
76+
display_name = "Module Name"
7777
url = "http://localhost:${var.port}"
7878
icon = local.icon_url
7979
subdomain = false
@@ -88,10 +88,10 @@ resource "coder_app" "MODULE_NAME" {
8888
}
8989
}
9090

91-
data "coder_parameter" "MODULE_NAME" {
92-
type = "list(string)"
93-
name = "MODULE_NAME"
94-
display_name = "MODULE_NAME"
91+
data "coder_parameter" "module_name" {
92+
type = "string"
93+
name = "module_name"
94+
display_name = "Module Name"
9595
icon = local.icon_url
9696
mutable = var.mutable
9797
default = local.options["Option 1"]["value"]

0 commit comments

Comments
 (0)