@@ -116,78 +116,19 @@ Brief description of who you are and what you do.
116116cd registry/[your-username]/modules/[module-name]
117117```
118118
119- ### 3. Build Your Module
120-
121- ** Edit ` main.tf ` ** - Your Terraform code:
122-
123- ``` terraform
124- terraform {
125- required_version = ">= 1.0"
126- required_providers {
127- coder = {
128- source = "coder/coder"
129- version = ">= 0.17"
130- }
131- }
132- }
133-
134- variable "agent_id" {
135- description = "The ID of a Coder agent."
136- type = string
137- }
138-
139- resource "coder_script" "install" {
140- agent_id = var.agent_id
141- script = file("${path.module}/run.sh")
142- }
143- ```
144-
145- ** Update ` README.md ` ** - Add proper frontmatter:
146-
147- ``` markdown
148- ---
149- display_name: "Tool Name"
150- description: "Brief description of what this module does"
151- icon: "../../../../.icons/tool.svg"
152- maintainer_github: "your-username"
153- verified: false
154- tags: ["development", "tool"]
155- ---
156-
157- # Tool Name
119+ This script generates:
120+ - ` main.tf ` - Terraform configuration template
121+ - ` README.md ` - Documentation template with frontmatter
158122
159- Brief description and usage example.
160-
161- ## Usage
162-
163- ```tf
164- module "tool" {
165- source = "registry.coder.com/[username]/[module]/coder"
166- version = "1.0.0"
167- agent_id = coder_agent.main.id
168- }
169- ```
170- ```
171-
172- **Write tests in `main.test.ts`**:
173- ```typescript
174- import { describe, expect, it } from "bun:test";
175- import { runTerraformApply, runTerraformInit, testRequiredVariables } from "~test";
176-
177- describe("module-name", async () => {
178- await runTerraformInit(import.meta.dir);
179-
180- it("should have required variables", async () => {
181- await testRequiredVariables(import.meta.dir);
182- });
123+ ### 3. Build Your Module
183124
184- it("should apply successfully", async () => {
185- await runTerraformApply(import.meta.dir, {
186- agent_id: "test-agent-id",
187- });
188- });
189- });
190- ```
125+ 1 . ** Edit ` main.tf ` ** to implement your module's functionality
126+ 2 . ** Update ` README.md ` ** with:
127+ - Accurate description and usage examples
128+ - Correct icon path (usually ` ../../../../.icons/your-icon.svg ` )
129+ - Proper tags that describe your module
130+ 3 . ** Create ` main.test.ts ` ** to test your module
131+ 4 . ** Add any scripts ** or additional files your module needs
191132
192133### 4. Test and Submit
193134
0 commit comments