Skip to content

Architecture: Infrastructure

Component: infraType: Infrastructure as Code Tool: Terraform

Design

The infrastructure layer defines the ephemeral runtime environment for the development workspaces using Terraform. It leverages the Coder provider to manage the lifecycle of the development environment.

Resources

  • coder_agent: The agent running inside the workspace. It handles the startup_script execution.
  • docker_volume: A persistent volume mounted to /home/coder to preserve user data across restarts.
  • docker_container: The actual container instance running the workspace image.
    • Privileged Mode: Enabled via var.enable_nested_virt (supports Docker-in-Docker).
    • Networking: Uses host.docker.internal for host access.

Variables

  • repo_url: Git repository to clone on startup.
  • dotfiles_url: URL for dotfiles personalization.
  • docker_image: The container image to use.
  • arch/os: System architecture parameters.

Released under the MIT License.