Development Guide: Infrastructure
Component: infraTool: Terraform
Getting Started
Prerequisites
- Terraform 1.0+
- Coder CLI (optional, for template management)
- Docker (for local validation)
Initialization
Initialize the Terraform working directory and download providers:
bash
cd infra/terraform/coder-template
terraform initValidation
Validate the configuration syntax:
bash
terraform validateDeployment (via Coder)
Typically, you do not run terraform apply locally for production. Instead, you push the template to Coder:
bash
coder templates push my-template -d infra/terraform/coder-templateLocal Testing
You can use terraform plan to verify resource changes, but full end-to-end testing requires the Coder environment.