terraform-docs is a CLI tool written in Go that automatically generates documentation from Terraform modules. It parses Terraform configuration files (variables, outputs, providers, resources, modules, requirements) using HashiCorp's terraform-config-inspect library, then renders the extracted metadata into multiple output formats including Markdown (table and document), AsciiDoc (table and document), JSON, YAML, TOML, XML, a colorized 'pretty' format, and tfvars (HCL and JSON). The tool supports extensive configuration via a YAML file or CLI flags, allowing users to control which sections are shown, sorting order, output file injection or replacement, recursive submodule processing, and custom headers/footers. It also features a plugin system based on go-plugin for extending formatters, and integrates with CI/CD pipelines, pre-commit hooks, and GitHub Actions. The architecture follows a clean separation of concerns: a cobra-based CLI dispatches to format-specific packages, which use Go templates for rendering. The codebase is well-tested with golden file tests covering edge cases like escape characters, code blocks, and multiline descriptions.
This repository contains a full-stack web application deployed on AWS ECS with a CI/CD pipeline. The frontend is a Vue.js application that retrieves product data from a backend Node.js/Express API. The backend scans a DynamoDB table and returns product information, including image URLs stored in S3. Infrastructure is provisioned via Terraform, including networking, ECS cluster/services, ECR repositories, IAM roles, CodePipeline/CodeBuild/CodeDeploy for Blue/Green deployments, autoscaling, and supporting resources (S3, DynamoDB, SNS). The architecture separates concerns with modular Terraform modules and implements production-grade practices like health checks, Swagger documentation, and stress testing.