Production-ready Terraform modules for cloud infrastructure
A comprehensive, well-tested collection of Terraform modules maintained by hoverkraft-tech
Features β’ Quick Start β’ Usage β’ Modules β’ Contributing β’ Support
This repository provides a reference modules library for building and managing cloud infrastructure with Terraform. Our modules are designed to be:
- β Production-ready β Tested and validated in real-world scenarios
- π§ Highly configurable β Flexible inputs to fit your use cases
- π Well-documented β Each module includes comprehensive documentation
- π Security-focused β Following cloud security best practices
- π― Opinionated β Sensible defaults for quick deployment
We primarily use these modules to set up complex Kubernetes infrastructure based on our full perimeter product hoverkraft DX-plan (more to come about it).
The current modules cover these topics:
- Repository β Create and manage GitHub repositories
- Branch Protection β Configure branch protection rules
- Repository Ruleset β Repository-wide rulesets
- Helm Release β Deploy Helm charts
- Namespace β Manage Kubernetes namespaces
- Secrets β Handle Kubernetes secrets
- Kubeconfig β Manage kubeconfig files
- Password Store β Integration with password-store/pass
Before using these modules, ensure you have:
- Terraform ~> 1.3 installed
- Cloud provider CLI tools configured (AWS CLI, OVH CLI, etc.)
- Valid credentials for your cloud provider
Modules can be used like any standard Terraform module. Here's a simple example:
module "my_aws_s3_bucket" {
source = "github.com/hoverkraft-tech/terraform-modules.git?ref=1.0.0//aws/s3-bucket"
name = "my-bucket"
}We recommend pinning to a specific version or tag:
module "eks_cluster" {
source = "github.com/hoverkraft-tech/terraform-modules.git?ref=v1.2.3//aws/eks-cluster"
name = "my-cluster"
cluster_version = "1.28"
vpc_id = module.vpc.vpc_id
private_subnet_ids = module.vpc.private_subnet_ids
}For development or testing, you can use the latest version from main:
module "github_repo" {
source = "github.com/hoverkraft-tech/terraform-modules.git//github/repository"
name = "my-awesome-project"
description = "An awesome project"
visibility = "public"
}Each module has its own detailed README.md with:
- π Input variables
- π€ Output values
- π Usage examples
- βοΈ Requirements
Navigate to any module directory to view its documentation.
View all available modules
- acm-certificate
- acm-certificate-validation
- cloudfront-distribution
- efs-access-point
- efs-filesystem
- eks-addons
- eks-cluster
- eks-nodegroup
- iam-eks-oidc-provider
- iam-policy
- iam-role
- iam-service-linked-role
- lambda
- launch-template
- rds-mysql-cluster
- route53-records
- s3-bucket
- s3-bucket-lifecycle-config
- s3-bucket-notification
- s3-bucket-policy
- s3-bucket-website-configuration
- security-group
- ssh-key-pair
- vpc
We welcome contributions from the community! Whether it's bug fixes, new modules, or documentation improvements, your help is appreciated.
We leverage the following tools to minimize work and time needed to review a PR:
- π§ asdf β Ensures we're using the same tool versions
- πͺ pre-commit β Automated checks before commits
# Clone the repository
git clone [email protected]:hoverkraft-tech/terraform-modules.git
cd terraform-modules
# Install required tools
asdf install
# Install pre-commit hooks
pre-commit install -t pre-push-
Create a branch for your work
git checkout -b feature/my-new-module
-
Copy the template as a boilerplate
cp -r _template my-provider/my-module
-
Customize your module with:
- Terraform resources
- Input variables
- Output values
- README documentation
-
Run pre-commit checks
pre-commit run --all-files
-
Submit a pull request
- Include a clear description of your module
- Reference any related issues
- Add examples of usage
-
Monitor CI checks and address any feedback
Our modules are validated with:
- β terraform-docs β Auto-generates documentation
- β tflint β Lints Terraform code
- β checkov β Security and compliance scanning
- β trivy β Vulnerability scanning
- Follow the existing module structure and naming conventions
- Include comprehensive documentation
- Add examples demonstrating module usage
- Ensure all pre-commit checks pass
- Write clear commit messages
This project is licensed under the MIT License - see the LICENSE file for details.
Need help? Here's how to get support:
- π Documentation: Check the module-specific README files
- π Bug Reports: Open an issue
- π‘ Feature Requests: Start a discussion
- π¬ Questions: Check existing issues or discussions
If you find these modules helpful, please consider:
- β Starring this repository
- π Forking for your own use
- π’ Sharing with others
- π€ Contributing improvements
These modules are maintained by the team at hoverkraft-tech. We're passionate about building reliable, scalable infrastructure and sharing our knowledge with the community.