๐ฅ Battle-tested โข ๐ Security-first โข ๐ฐ Cost-optimized โข ๐ Developer-friendly
From MVP to Enterprise: Infrastructure that scales with your business
Deploy production-grade AWS building blocks fast with battle-tested Terraform modules (secure defaults, full customization, clear docs).
# Try the smallest stack (~$46/mo)
git clone https://github.com/nanlabs/terraform-aws-modules.git
cd terraform-aws-modules/examples/simple-web-app
terraform init && terraform apply
Need something bigger? Jump to the example catalog or full module list below.
Secure by default, production-proven, cost-aware, and fully overridable. Built to scale from MVP to multi-account enterprise without rewriting your Terraform.
Show feature matrix
- ๐ก๏ธ Reliability: MultiโAZ patterns, zeroโdowntime friendly changes, safe defaults that avoid accidental data loss.
- ๐ Security: KMS encryption everywhere, leastโprivilege IAM surfaces, GitHub OIDC (keyless CI), optional CloudTrail + Config integration.
- ๐ฐ Cost Awareness: Rightโsized defaults, optโin NAT / Transit Gateway, lifecycle policies for cold data, no hidden alwaysโon extras.
- ๐ Observability: VPC Flow Logs ready, log/metrics hooks, consistent naming for tracing & tagging, surfaces for future dashboards.
- ๐งช Developer Experience: Consistent variable names, โcomplete wrapperโ philosophy, rich runnable examples, autoโgenerated docs.
- ๐งฉ Extensibility: All upstream module variables & outputs exposed, composable building blocks, feature flags instead of forks.
Pick a starting point:
Tier | Example | What You Get | Est. Cost* |
---|---|---|---|
Starter | ๐ Simple Web App | Minimal VPC + one compute entrypoint (low cost) | ~$46 |
Growth | โ๏ธ Medium Complexity | EKS + RDS + Bastion (microservices base) | ~$300 |
Enterprise | ๐ข Complete Enterprise | Full platform: multi-AZ network, EKS, RDS (HA), MSK, TGW | ~$940 |
Need data / security / networking patterns? See the expanded catalog.
Full example catalog (with costs & focus areas)
Example | Core Services | Focus | Est. Cost* |
---|---|---|---|
๐ Simple Web App | VPC + minimal compute | MVP / quick start | ~$46 |
โ๏ธ Medium Complexity | VPC, EKS, RDS, Bastion | Microservices staging | ~$300 |
๐ข Complete Enterprise | VPC (multi-AZ), EKS, RDS (HA), MSK, TGW, encryption | Production foundation | ~$940 |
๐ Secure Multi-Environment Data Platform | CloudTrail, Config, Data Lake, Glue, KMS | Compliance & governance | ~$420 |
๐ฐ๏ธ Hub & Spoke Networking | Transit Gateway + multi-VPC | Segmentation / org networking | ~$160 |
๐ Analytics + Document Store | Data Lake, DocumentDB, MSK, Glue | Hybrid analytics (structured + doc) | ~$780 |
๐ Data Processing Pipeline | Data Lake, Glue Jobs + Workflow | Batch ETL / curation | ~$180 |
๐งฉ Multi-Account Data Platform (Simulated) | Central KMS, TGW, Data Lake, Glue, Bastion | Multi-account pattern | ~$210 |
*Estimates at authoring time, us-east-1 on-demand, minimal throughput. Validate with AWS Pricing Calculator / Infracost before production.
Tip
New here? Jump to the Usage Guide or scan the modules below.
Building and maintaining infrastructure across cloud providers can become repetitive and error-prone. This repository consolidates reusable Terraform modules following best practices, allowing your team to provision infrastructure efficiently, securely, and consistentlyโwhether it's an AWS VPC, a Kubernetes cluster, or a MongoDB Atlas database.
Highly opinionated wrappers around official modulesโsimple defaults, full override capability.
Categories:
- Network & Access: VPC, Bastion, Transit Gateway (+ Spokes), Shared Networking
- Compute & Orchestration: EKS, Amplify
- Data & Analytics: RDS / Aurora, MSK, DocumentDB, Data Lake infra & encryption, Glue suite
- Security & Governance: CloudTrail, Config, GitHub OIDC, TF State Backend
- Multi-Cloud: MongoDB Atlas
Show full module catalog
Module | Description | Use Cases |
---|---|---|
๐ AWS VPC | VPC with subnets, flow logs, sane defaults | Network foundation, multi-AZ setup |
โก AWS EKS | Managed Kubernetes + addons wrapper | Microservices, container orchestration |
๐๏ธ AWS RDS | Relational DB (backups, monitoring) | Application persistence |
๐๏ธ AWS RDS Aurora | High-performance Aurora cluster | HA & read scaling |
๐จ AWS MSK | Managed Kafka (secure & multi-AZ) | Event streaming, pipelines |
๐ฐ AWS Bastion | SSM-based secure jump host | Admin access, troubleshooting |
๐ AWS DocumentDB | MongoDB-compatible document store | Flexible JSON workloads |
๐ค AWS IAM Role | Opinionated IAM role creation | Least-privilege access |
๐ AWS Amplify App | Frontend hosting & CI/CD | Static & SPA delivery |
๐ AWS CloudTrail | Central activity logging | Audit & compliance |
๐ก๏ธ AWS Config | Resource config tracking & rules | Governance & drift detection |
๐งฑ AWS Data Lake Encryption | Central KMS (S3 + Glue keys) | Unified encryption & rotation |
๐๏ธ AWS Data Lake Infrastructure | Medallion S3 layout scaffold | Bronze/Silver/Gold zoning |
๐งฌ AWS Glue Code Registry | Schema/code registry | ETL governance |
๐ AWS Glue Data Lake Catalog | Catalog databases / tables | Metadata discovery |
๐ ๏ธ AWS Glue Jobs | Map-based multi Glue jobs | Batch / Spark ETL |
๐ AWS Glue Workflow | Workflow & trigger orchestration | Chained ETL processes |
Central routing hub | Multi-VPC topology | |
๐ฐ๏ธ AWS Transit Gateway Spoke | VPC attachment wrapper | Hub & spoke expansion |
๐ธ๏ธ AWS Shared Networking | Shared services networking layer | Central endpoints & DNS |
๐ฆ AWS TF State Backend | S3 + DynamoDB state backend | Remote state & locking |
๐ AWS GitHub OIDC Provider | OIDC federation for CI | Keyless deployments |
Module | Description | Use Cases |
---|---|---|
๐ MongoDB Atlas Cluster | Managed multi-cloud MongoDB | Global & serverless data |
Each module is designed to be plug-and-play with sensible defaults, yet highly customizable for complex requirements.
module "vpc" {
source = "git::https://github.com/nanlabs/terraform-aws-modules.git//modules/aws-vpc?ref=v0.2.0"
vpc_cidr = "10.0.0.0/16"
# That's it! VPC with best practices is ready ๐
}
๐ See the Usage Guide for advanced patterns (version pinning, multi-account, remote state, KMS sharing).
๐ Quick Start | ๐ Learn More | ๐ค Get Help |
---|---|---|
Browse Examples | Read Documentation | Join Discussions |
Pick an example that fits your needs | Understand best practices | Ask questions, share ideas |
โญ If this project helps you, please consider giving it a star! โญ
We love contributions! Whether you're:
- ๐ Reporting bugs or suggesting improvements
- ๐ Improving documentation or adding examples
- ๐ Adding new modules or enhancing existing ones
- ๐ก Sharing ideas for new features
Every contribution matters! Check our Contributing Guidelines to get started.
- Star this repo - It helps others discover these modules
- Share your experience - Write a blog post or tweet about your usage
- Submit feedback - Open issues with suggestions or bug reports
- Code contributions - Submit PRs for new features or fixes
- Documentation - Help improve guides and examples
๐ Guide | ๐ฏ Purpose |
---|---|
๐ Usage Guide | Complete module usage, versioning, and advanced patterns |
๐ ๏ธ Development Setup | Set up your development environment |
๐ฆ Modules Guide | How to use and create modules |
โญ Best Practices | Module design, security, and guidelines |
๐ Versioning Strategy | Release management and versioning |
๐ GitHub Actions | CI/CD workflows and automation |
๐ค Contributing | How to contribute to this repository |
- ๐ Awesome NAN - Best practices and resources
- ๐ Terraform Documentation - Official Terraform docs
- โ๏ธ AWS Provider Documentation - AWS provider reference
- ๐ฌ NaN Labs Blog - Technical articles and insights
This project is licensed under the MIT License - see the LICENSE file for details.
Made with contributors-img.
๐ Built with โค๏ธ by NaN Labs
๐ Accelerating development through proven technology solutions