
Introducing tfgen: configure your Terraform stacks using plain Go
7/21/2026
This post introduces tfgen, a new open-source tool developed by Ably to generate Terraform configurations using Go. It details the motivation for creating tfgen, stemming from the sunsetting of CDKTF and the desire for a more flexible solution. The post explains tfgen's design, which focuses on a simple public interface for defining resources and their configurations in Go, producing Terraform-compatible JSON. It highlights the use of AI in migrating existing CDKTF configurations to tfgen and showcases examples of using tfgen with the Ably Terraform provider. The post also clarifies tfgen's compatibility with OpenTofu and its differences from CDKTF.