Skip to content

Terraform Repo Template

A structured template for Terraform projects, enabling consistent and scalable infrastructure deployments with best practices, CI/CD integration, and environment-specific configurations.

Features

  • Multi-environment support - Pre-configured dev, qa, and prod environments with environment-specific tfvars
  • Security scanning - Multi-layer scanning with Checkov, TFLint, and Gitleaks
  • CI/CD pipelines - GitHub Actions workflows for validation, deployment, cost estimation, and release management
  • Pre-commit hooks - Automated code quality checks including formatting, validation, and secret detection
  • Module system - Production-ready reusable Terraform modules with documentation
  • Auto-tagging - All resources automatically tagged with ManagedBy and Environment
  • Semantic releases - Automated versioning and changelog generation from conventional commits
  • Dev container - Pre-configured development environment with all required tools

Quick Navigation

Section Description
Quick Start Get up and running in minutes
Usage Guide Full command reference and working with environments
Repository Structure Annotated directory tree and file descriptions
Contributing Branching strategy, PR process, and code review
Commit Conventions Conventional commits format and version impact
Configuration Reference for all configuration files
Security Security scanning layers and secure defaults
CI/CD Workflows All GitHub Actions workflows documented
Changelog Release history and changelog process

Tech Stack

Tool Purpose
Terraform >= 1.0 Infrastructure as Code
AWS Provider ~> 5.0 Cloud provider
TFLint Linting with AWS plugin
Checkov Policy-as-code security scanning
Gitleaks Secret detection
Semantic Release Automated versioning
Infracost Cost estimation
terraform-docs Auto-generated documentation
Pre-commit Git hook management