Back to Glossary
IaC

What is Module (Terraform)?

A reusable container of Terraform configuration that encapsulates a set of resources.

A Terraform Module is a container for multiple resources that are used together. Modules allow you to encapsulate infrastructure patterns — an 'ec2-web-server' module might create an EC2 instance, security group, IAM role, and EIP together. Modules have input variables, output values, and a clear interface. The Terraform Registry hosts thousands of community modules (VPC, EKS, RDS). Root module is your main working directory; child modules are called from it.

Test your knowledge of Module (Terraform) and 130 other DevOps concepts