Files
coder-templates/coder-base
2025-07-12 13:34:27 -04:00
..
2025-07-12 13:34:27 -04:00
2025-07-10 10:25:04 -04:00
2025-07-12 12:16:22 -04:00
2025-07-09 10:11:30 -04:00

🖥️ Coder Base Module

This module provides the shared logic and workspace provisioning foundation for my Coder templates using Docker containers.

It is designed to be imported and reused by language-specific templates to standardize configuration and reduce duplication

📦 Features

  • 🐳 Containerized Workspaces

    • Provisions Docker containers using a specified image
  • 💻 Remote IDE Support

    • VS Code Server with configurable extensions and settings
    • JetBrains Gateway support with selectable IDEs (IntelliJ, PhpStorm, etc.)
  • 🧰 Custom Tooling Support

    • Startup scripts to initialize language environments
  • 🔃 Optional Git Repo Clone

    • Clones a user-specified repository into ~/repo during provisioning

📁 File Structure

coder-base/
├── main.tf         # Main logic for provisioning the workspace
├── variables.tf    # Input variables for customization
├── outputs.tf      # Variables available to use in templates

🔧 Inputs

Name Type Description Default Required
docker_image string Docker image to use for the workspace n/a ✅ Yes
vscode_extensions list(string) List of VS Code extensions to install [] ❌ No
vscode_settings map(string) Key-value VS Code settings {} ❌ No
jetbrains_ides list(string) JetBrains IDEs to enable (e.g., ["IU", "PS"]) ["IU"] ✅ Yes
jetbrains_default string Default JetBrains IDE to launch "IU" ✅ Yes
docker_socket string Optional Docker socket override "" ❌ No
repo_url string Git repository to clone into ~/repo "" ❌ No
language_startup_script string Startup shell script executed on container boot "" ❌ No
language_metadata list(object) Custom metadata blocks shown in Coder UI (e.g. versions) [] ❌ No

Each language_metadata object includes:

{
  display_name = string
  key          = string
  script       = string
  interval     = number
  timeout      = number
}