The origin story explained why Dinghy renders TSX to Terraform. This post is the how, at two levels. First we create an EC2 instance by hand from the lowest-level pieces Dinghy gives you, one component per Terraform resource. Then we bundle those pieces into composite components and watch eight lines of TSX turn into a complete server stack: VPC, subnet, security group, IAM, and more.

Part 1: Basic service components

One component per Terraform resource

The foundation of Dinghy's AWS support is a set of basic service components. There is one component for every Terraform resource, generated directly from the provider schema:

Terraform resource