mohammed firdous
blogprojectsopen sourcediagramsexperiencecertifications

Terra Towns

·source
Terra Towns

A Geocities-style community website where users deploy their own personal websites ("Terra Houses") using Terraform.

TerraTowns is a community project inspired by the creative, self-hosted spirit of Geocities, but with a modern twist. It's a platform where developers, or "Terraformers," can use Infrastructure as Code (IaC) to launch their own personal websites, called "Terra Houses."

The project served as a hands-on bootcamp for learning Terraform in a fun and practical way. Each user writes Terraform code to provision and deploy their own simple Content Management System (CMS), which then becomes part of the larger TerraTowns network.

What it is

TerraTowns is a serverless web application with a unique purpose:

  • Community Hub: A central website to discover and connect with other "Terraformers."
  • Terra Houses: Each user provisions their own personal website—a "Terra House"—using Terraform.
  • Infrastructure as Code: The core of the project is learning and applying IaC principles to create and manage real cloud resources.

Key Technical Details

  • Infrastructure as Code: The project is built entirely around Terraform for provisioning all cloud infrastructure.
  • Custom Terraform Provider: A key feature is a custom Terraform provider written in Go, which interfaces with the TerraTowns platform.
  • Cloud Platform: The infrastructure is hosted on AWS, leveraging services like S3 for website hosting, CloudFront for content delivery, and Lambda and API Gateway for serverless functions.
  • Development Environment: The project uses Gitpod to provide a consistent, cloud-based development environment for all users.
  • Local Testing: A mock server written in Ruby is included to allow for local development and testing of the Terraform provider.

Screenshots

Terra Towns Screenshot 1

What I Learned

  • Custom Terraform Providers: I learned how to build a custom Terraform provider from scratch using Go, allowing me to extend Terraform's functionality to interact with a custom API.
  • Practical IaC: This project was a deep dive into using Infrastructure as Code not just for deploying applications, but for empowering users to create their own infrastructure.
  • Serverless Integration: I gained experience integrating various AWS services (S3, CloudFront, Lambda) into a cohesive, serverless application.
  • Importance of Mocking: Building a mock server was crucial for enabling fast local development and testing cycles, especially when developing the custom provider.