Modules
Modules are reusable "infrastructure building blocks" describing how to deploy and manage specific pieces of infrastructure, such as a VPC, ECS cluster, or Auto Scaling Group.
Most modules are written in OpenTofu/Terraform and define multiple AWS resources.
Example
Consider the rds
module. This OpenTofu/Terraform module creates an RDS database, the IAM roles required to operate it, optional read replicas, database subnet groups, and relevant security groups.
While the module addresses key elements of an RDS deployment, it does not provide a complete solution. It excludes features like backup policies using AWS Backup, RDS Proxy for connection pooling, and CloudWatch alarms for monitoring. These missing elements are available as separate building block modules, such as backup-plan
, backup-vault
, and rds-proxy
, which you can use alongside the rds
module.
To explore complete solutions combining building blocks, refer to Service Modules.
Modules are optimized for control
Modules are designed to be small, narrow in scope, and highly reusable. They prioritize control over convenience, making them suitable for diverse use cases. Deploying a complete infrastructure solution often requires assembling multiple modules.
Consider Service Modules when optimizing for greater convenience.
For insights on building block versus service modules, see Introducing: The Gruntwork Module, Service, and Architecture Catalogs.
When to use a building block module
Building block modules are typically generic. Instead of deploying a single module, users write code combining multiple modules for specific use cases. For instance, one module might deploy Kubernetes control planes while another deploys worker nodes. A Kubernetes cluster requires both modules.
We recommend using the Service Catalog for everyday use cases, with the entire module catalog available for more complex needs.
Where to find the building block modules
The module catalog features over 250 building block modules spanning three primary use cases:
- AWS foundations
- Running applications
- Storing data
To browse the module catalog, see the Library Reference or peruse the private Gruntwork GitHub repositories using your subscription.
How modules are updated
Gruntwork employs AWS and OpenTofu/Terraform experts who monitor updates from AWS, OpenTofu, Terraform, and the broader DevOps community. Feedback from the Gruntwork customer community also informs updates. They incorporate the most significant updates into new features and releases.
Refer to Gruntwork releases for a comprehensive listing of updates.