Welcome to the Terraform Cloud Modules repository! This collection of reusable modules provides a robust foundation for provisioning cloud infrastructure across a variety of services. With support for AWS and third-party providers like MongoDB Atlas, these modules are designed for flexibility, scalability, and best practices across cloud platforms.
📖 CLICK OR TAP ❲☰❳ TO SHOW TABLE-OF-CONTENTS 📖
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.
All infrastructure components are encapsulated as independent Terraform modules, which you can reuse across projects and environments. Each module has its own documentation and example usage.
While most modules are designed for AWS (e.g., VPC, EKS, RDS, IAM), this repository also includes modules for services like MongoDB Atlas, making it easier to manage third-party services alongside native cloud resources.
The examples/
directory provides ready-to-use configurations to demonstrate how to integrate modules in real-world scenarios. Perfect for bootstrapping your infrastructure setup or testing locally.
Modules follow cloud provider recommendations for secure configuration. Sensitive values (like secrets) are never hardcoded and can be managed through secrets managers or parameter stores depending on the environment.
modules/ → Reusable infrastructure modules
examples/ → Usage examples for each module
scripts/ → Helper scripts (e.g., kubeconfig generator, bastion tunneling)
Below is a sample of the available modules:
Module Name | Description |
---|---|
aws-vpc |
Provisions VPCs with public/private subnets. |
aws-bastion |
Creates a bastion host for secure SSH access. |
aws-eks |
Provisions an Amazon EKS Kubernetes cluster. |
aws-msk |
Deploys an Amazon MSK (Kafka) cluster. |
aws-rds |
Provisions a PostgreSQL RDS instance. |
aws-rds-aurora |
Provisions an Aurora cluster (MySQL/PostgreSQL). |
aws-iam-role |
Creates IAM roles and policies. |
aws-vpc-endpoints |
Configures VPC endpoints (e.g., S3, DynamoDB). |
aws-amplify-app |
Provisions an AWS Amplify application. |
mongodb-atlas-cluster |
Provisions a MongoDB Atlas database cluster. |
Check each module's README.md
inside the modules/
directory for inputs, outputs, and usage examples.
Visit the examples/
directory for full infrastructure setups using one or more modules. These examples can be used to validate module behavior, onboard new teams, or act as blueprints for real-world deployments.
Find helper scripts in scripts/
for tasks like:
- Connecting to bastion hosts
- Creating tunnels to EKS clusters
- Generating kubeconfig files
- Automating environment setup with
direnv
Check the scripts README for more info.
- All modules follow Terraform best practices for naming, input validation, and documentation.
- Sensitive data should be injected via secrets managers or parameter stores.
- Consider using Checkov or tfsec for security scanning.
- Validate your code with
terraform validate
and format withterraform fmt -recursive
.
We welcome improvements and fixes! Please see CONTRIBUTING.md before opening a PR.
Made with contributors-img.