Coder Registry: Terraform modules/templates for Coder workspaces under registry/[namespace]/modules/ and registry/[namespace]/templates/.
bun run fmt # Format code (Prettier + Terraform) - run before commits
bun run tftest # Run all Terraform tests
bun run tstest # Run all TypeScript tests
terraform init -upgrade && terraform test -verbose # Test single module (run from module dir)
bun test main.test.ts # Run single TS test (from module dir)
./scripts/terraform_validate.sh # Validate Terraform syntax
./scripts/new_module.sh ns/name # Create new module scaffold
.github/scripts/version-bump.sh patch | minor | major # Bump module version after changes- Modules:
registry/[ns]/modules/[name]/withmain.tf,README.md(YAML frontmatter),.tftest.hcl(required) - Templates:
registry/[ns]/templates/[name]/withmain.tf,README.md - Validation:
cmd/readmevalidation/(Go) validates structure/frontmatter; URLs must be relative, not absolute
- Every module MUST have
.tftest.hcltests; optionalmain.test.tsfor container/script tests - README frontmatter:
display_name,description,icon,verified: false,tags - Use semantic versioning; bump version via script when modifying modules
- Docker tests require Linux or Colima/OrbStack (not Docker Desktop)
- Use
tf(nothcl) for code blocks in README; use relative icon paths (e.g.,../../../../.icons/) - Do NOT include input/output variable tables in module or template READMEs. The registry automatically generates these from the Terraform source (e.g., variable and output blocks in
main.tf). Adding them to the README is redundant and creates maintenance drift. - Usage examples (e.g., a
module "..." { }block) are encouraged, but not tables enumerating inputs/outputs.
- Version bumped via
.github/scripts/version-bump.shif module changed (patch=bugfix, minor=feature, major=breaking) - Breaking changes documented: removed inputs, changed defaults, new required variables
- New variables have sensible defaults to maintain backward compatibility
- Tests pass (
bun run tftest,bun run tstest); add diagnostic logging for test failures - README examples updated with new version number; tooltip/behavior changes noted
- Shell scripts handle errors gracefully (use
|| echo "Warning..."for non-fatal failures) - No hardcoded values that should be configurable; no absolute URLs (use relative paths)
- If AI-assisted: include model and tool/agent name at footer of PR body (e.g., "Generated with Amp using Claude")