@@ -20,9 +20,9 @@ The Coder Registry is a collection of Terraform modules and templates for Coder
20
20
21
21
- Basic Terraform knowledge (for module development)
22
22
- Terraform installed ([ installation guide] ( https://developer.hashicorp.com/terraform/install ) )
23
- - Docker (for some modules' tests that rely on containers )
23
+ - Docker (for running tests)
24
24
25
- ### Install Dependencies (for formatting and scripts)
25
+ ### Install Dependencies
26
26
27
27
Install Bun:
28
28
@@ -124,21 +124,17 @@ This script generates:
124
124
- Accurate description and usage examples
125
125
- Correct icon path (usually ` ../../../../.icons/your-icon.svg ` )
126
126
- Proper tags that describe your module
127
- 3 . ** Create at least one ` .tftest.hcl ` ** to test your module with ` terraform test `
127
+ 3 . ** Create ` main.test.ts ` ** to test your module
128
128
4 . ** Add any scripts** or additional files your module needs
129
129
130
130
### 4. Test and Submit
131
131
132
132
``` bash
133
- # Test your module (from the module directory)
134
- terraform init -upgrade
135
- terraform test -verbose
136
-
137
- # Or run all tests in the repo
138
- ./scripts/terraform_test_all.sh
133
+ # Test your module
134
+ bun test -t ' module-name'
139
135
140
136
# Format code
141
- bun run fmt
137
+ bun fmt
142
138
143
139
# Commit and create PR
144
140
git add .
@@ -339,12 +335,11 @@ coder templates push test-[template-name] -d .
339
335
### 2. Test Your Changes
340
336
341
337
``` bash
342
- # Test a specific module (from the module directory)
343
- terraform init -upgrade
344
- terraform test -verbose
338
+ # Test a specific module
339
+ bun test -t ' module-name'
345
340
346
341
# Test all modules
347
- ./scripts/terraform_test_all.sh
342
+ bun test
348
343
```
349
344
350
345
### 3. Maintain Backward Compatibility
@@ -393,7 +388,7 @@ Example: `https://github.com/coder/registry/compare/main...your-branch?template=
393
388
### Every Module Must Have
394
389
395
390
- ` main.tf ` - Terraform code
396
- - One or more ` .tftest.hcl ` files - Working tests with ` terraform test `
391
+ - ` main.test.ts ` - Working tests
397
392
- ` README.md ` - Documentation with frontmatter
398
393
399
394
### Every Template Must Have
@@ -493,6 +488,6 @@ When reporting bugs, include:
493
488
2 . ** No tests** or broken tests
494
489
3 . ** Hardcoded values** instead of variables
495
490
4 . ** Breaking changes** without defaults
496
- 5 . ** Not running** formatting ( ` bun run fmt ` ) and tests ( ` terraform test ` ) before submitting
491
+ 5 . ** Not running** ` bun fmt ` before submitting
497
492
498
493
Happy contributing! 🚀
0 commit comments