A module allows you to group resources together and reuse this group later, possibly many times to avoid starting from scratch again and again. Having as much as possible can be a real time saver when writing code and trying to get your cloud infrastructure to work.
We took a look at the most popular Terraform Modules by the number of downloads from the Terraform registry. There are 12 modules for AWS, 5 for Google, and 3 from CloudPosse.
We hope this ranking will help you learn more about some modules you may not already know.
A Terraform module which creates VPC resources on AWS.
A Terraform Module to define a consistent naming convention by (namespace, tenant, environment, stage, name, attributes).
A Terraform module which creates IAM resources on AWS. This module has two features, one allows you to create cross account access by defining IAM roles and the second one lets you set up individual IAM ressources as shown below :
A Terraform module which creates EC2-VPC security groups on AWS.
This module aims to implement combinations of arguments supported by AWS and latest stable version of Terraform:
You can use two ways to create security groups using this module:
A Terraform module used to create an Elastic Kubernetes (EKS) cluster and associated resources.
A Terraform module which creates S3 bucket resources on AWS.
You can use this module to create three types of buckets:
A Terraform module which takes care of a lot of AWS Lambda/serverless tasks (build dependencies, packages, updates, deployments) in countless combinations.
You can use this module in various ways, but here is the simplest way to use it, using this module to store packages locally:
A Terraform module which creates RDS resources on AWS. You can use it to create specifically four RDS ressources: DB instance, DB subnet group, DB parameter group and DB option group.
A Terraform module which allows you to create opinionated Google Cloud Platform projects. You can use it to create projects and configure aspects like Shared VPC connectivity, IAM access, Service Accounts, and API enablement.
Terraform module to create an AWS Application/Network Load Balancer (ALB/NLB) and associated resources. As the name suggests, you can use this modules to create either an ALB or NLB. However, the ALB modules can be used in three different ways :
A Terraform module which makes it easier to non-destructively manage multiple IAM roles for resources on the Google Cloud Platform. You can use this module with a collection of various submodules.
This module for basically allows you to execute gcloud commands within Terraform.
A Terraform module which loads an opinionated "stack" configuration from local or remote YAML sources. It supports deep-merged variables, settings, ENV variables, backend config, and remote state outputs for Terraform and helmfile components.
A Terraform module which creates RDS Aurora resources on AWS.
A Terraform module which creates and validates ACM certificate. Depending on how you want to validate your ACM certificates, there is four ways you can use this module:
A Terraform module which creates EC2 instance(s) on AWS. Depending on how many EC2 instances you want to create, there is three ways to use this module:
A Terraform module to generate well-formed JSON documents that are passed to the aws_ecs_task_definition Terraform resource.
A Terraform module that makes it easy to set up a new VPC Network in GCP. Using it, you can create a Google VPC, Subnets within that VPC and secondary range for the subnets.
A Terraform module for configuring GKE clusters.
A Terraform module which creates Auto Scaling resources on AWS