@@ -24,7 +24,7 @@ The Coder Registry is a collection of Terraform modules and templates for Coder
2424
2525### Install Dependencies
2626
27- Install Bun:
27+ Install Bun (for formatting and scripts) :
2828
2929``` bash
3030curl -fsSL https://bun.sh/install | bash
@@ -89,7 +89,7 @@ Create `registry/[your-username]/README.md`:
8989---
9090display_name: "Your Name"
9191bio: "Brief description of who you are and what you do"
92- avatar_url : "./.images/avatar.png"
92+ avatar : "./.images/avatar.png"
9393github: "your-username"
9494linkedin: "https://www.linkedin.com/in/your-username" # Optional
9595website: "https://yourwebsite.com" # Optional
@@ -102,7 +102,7 @@ status: "community"
102102Brief description of who you are and what you do.
103103```
104104
105- > ** Note** : The ` avatar_url ` must point to ` ./.images/avatar.png ` or ` ./.images/avatar.svg ` .
105+ > ** Note** : The ` avatar ` must point to ` ./.images/avatar.png ` or ` ./.images/avatar.svg ` .
106106
107107### 2. Generate Module Files
108108
@@ -124,19 +124,23 @@ 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 ` main.test.ts ` ** to test your module
127+ 3 . ** Create at least one ` .tftest.hcl ` ** to test your module with ` terraform test `
1281284 . ** Add any scripts** or additional files your module needs
129129
130130### 4. Test and Submit
131131
132132``` bash
133- # Test your module
134- bun test -t ' module-name'
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
135139
136140# Format code
137- bun fmt
141+ bun run fmt
138142
139- # Commit and create PR
143+ # Commit and create PR (do not push to main directly)
140144git add .
141145git commit -m " Add [module-name] module"
142146git push origin your-branch
@@ -335,11 +339,12 @@ coder templates push test-[template-name] -d .
335339### 2. Test Your Changes
336340
337341``` bash
338- # Test a specific module
339- bun test -t ' module-name'
342+ # Test a specific module (from the module directory)
343+ terraform init -upgrade
344+ terraform test -verbose
340345
341346# Test all modules
342- bun test
347+ ./scripts/terraform_test_all.sh
343348```
344349
345350### 3. Maintain Backward Compatibility
@@ -388,7 +393,7 @@ Example: `https://github.com/coder/registry/compare/main...your-branch?template=
388393### Every Module Must Have
389394
390395- ` main.tf ` - Terraform code
391- - ` main.test.ts ` - Working tests
396+ - One or more ` .tftest.hcl ` files - Working tests with ` terraform test `
392397- ` README.md ` - Documentation with frontmatter
393398
394399### Every Template Must Have
@@ -488,6 +493,6 @@ When reporting bugs, include:
4884932 . ** No tests** or broken tests
4894943 . ** Hardcoded values** instead of variables
4904954 . ** Breaking changes** without defaults
491- 5 . ** Not running** ` bun fmt ` before submitting
496+ 5 . ** Not running** formatting ( ` bun run fmt ` ) and tests ( ` terraform test ` ) before submitting
492497
493498Happy contributing! 🚀
0 commit comments