@@ -20,9 +20,9 @@ The Coder Registry is a collection of Terraform modules and templates for Coder
2020
2121- Basic Terraform knowledge (for module development)
2222- 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)
2424
25- ### Install Dependencies (for formatting and scripts)
25+ ### Install Dependencies
2626
2727Install Bun:
2828
@@ -124,21 +124,17 @@ This script generates:
124124 - Accurate description and usage examples
125125 - Correct icon path (usually ` ../../../../.icons/your-icon.svg ` )
126126 - 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
1281284 . ** Add any scripts** or additional files your module needs
129129
130130### 4. Test and Submit
131131
132132``` 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'
139135
140136# Format code
141- bun run fmt
137+ bun fmt
142138
143139# Commit and create PR
144140git add .
@@ -339,12 +335,11 @@ coder templates push test-[template-name] -d .
339335### 2. Test Your Changes
340336
341337``` 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'
345340
346341# Test all modules
347- ./scripts/terraform_test_all.sh
342+ bun test
348343```
349344
350345### 3. Maintain Backward Compatibility
@@ -393,7 +388,7 @@ Example: `https://github.com/coder/registry/compare/main...your-branch?template=
393388### Every Module Must Have
394389
395390- ` main.tf ` - Terraform code
396- - One or more ` .tftest.hcl ` files - Working tests with ` terraform test `
391+ - ` main.test.ts ` - Working tests
397392- ` README.md ` - Documentation with frontmatter
398393
399394### Every Template Must Have
@@ -493,6 +488,6 @@ When reporting bugs, include:
4934882 . ** No tests** or broken tests
4944893 . ** Hardcoded values** instead of variables
4954904 . ** 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
497492
498493Happy contributing! 🚀
0 commit comments