Skip to content

Commit 0d55749

Browse files
test: add test module for version bump verification
1 parent e17d545 commit 0d55749

File tree

2 files changed

+86
-0
lines changed

2 files changed

+86
-0
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
display_name: "Test Module"
3+
description: "A test module for version bump verification"
4+
icon: "../../../../.icons/tool.svg"
5+
verified: false
6+
tags: ["test", "verification"]
7+
---
8+
9+
# Test Module
10+
11+
This module tests various version bump scenarios.
12+
13+
## Usage
14+
15+
Standard usage (source first):
16+
17+
```tf
18+
module "standard" {
19+
source = "registry.coder.com/testnamespace/testmodule/coder"
20+
version = "1.5.0"
21+
22+
agent_id = coder_agent.main.id
23+
}
24+
```
25+
26+
Version-first style (the bug case):
27+
28+
```tf
29+
module "version_first" {
30+
version = "1.5.0"
31+
source = "registry.coder.com/testnamespace/testmodule/coder"
32+
33+
agent_id = coder_agent.main.id
34+
}
35+
```
36+
37+
Module with multiple version fields:
38+
39+
```tf
40+
module "multiple_versions" {
41+
source = "registry.coder.com/testnamespace/testmodule/coder"
42+
version = "1.5.0"
43+
44+
agent_id = coder_agent.main.id
45+
tool_version = "2.0.0"
46+
boundary_version = "3.0.0"
47+
agentapi_version = "4.0.0"
48+
}
49+
```
50+
51+
Different module (should NOT be updated):
52+
53+
```tf
54+
module "other" {
55+
source = "registry.coder.com/other/module/coder"
56+
version = "9.9.9"
57+
}
58+
```
59+
60+
Multiple instances with different indentation:
61+
62+
```tf
63+
module "two_space" {
64+
source = "registry.coder.com/testnamespace/testmodule/coder"
65+
version = "1.5.0"
66+
}
67+
68+
module "four_space" {
69+
source = "registry.coder.com/testnamespace/testmodule/coder"
70+
version = "1.5.0"
71+
}
72+
```
73+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
terraform {
2+
required_version = ">= 1.0"
3+
}
4+
5+
resource "coder_agent" "test" {
6+
os = "linux"
7+
arch = "amd64"
8+
}
9+
10+
output "agent_id" {
11+
value = coder_agent.test.id
12+
}
13+

0 commit comments

Comments
 (0)